voice-recording

Can't encode an Audio file to Base64?

血红的双手。 提交于 2019-12-11 10:55:22
问题 Objective: Dialog Flow Voice Bot Api I need to send a wav file to the Dialog Flow Api and the format and settings were pre-defined. So I recorded an audio using AVAudioRecorder in .wav format using following settings audioFilename = getDocumentsDirectory().appendingPathComponent("input.wav") let settings: [String: Any] = [ AVFormatIDKey: Int(kAudioFormatLinearPCM), AVSampleRateKey: 16000, AVNumberOfChannelsKey: 2, AVLinearPCMBitDepthKey: 16, AVLinearPCMIsBigEndianKey: false,

Audio manipulation and delete some part of the audio

牧云@^-^@ 提交于 2019-12-11 02:09:24
问题 I'm new in voice codding, now I am succeed to recording microphone in the files and save each 10 seconds in a file with SaveRecordtoFile function(doing this with no problem) Now I want to delete for example 2 seconds from the recorded data so my output will be 8 seconds instead of 10, in the randomTime array 0 is the number of seconds witch I want to be delete... In a for-loop I copy the data of waveHeader->lpData in a new buffer if (randomTime[i] == '1') 10 seconds: delete the data of second

Recorded sound file (ala google now, google keep) - RecognizerIntent/Listener

无人久伴 提交于 2019-12-09 13:32:20
问题 I have been developing an application that uses the recognizerIntent to get voice input. However, since jelly bean was launched, I have not been able to get the actual sound file from my voice input. In the recognitionListener (http://developer.android.com/reference/android/speech/RecognitionListener.html) there is a method called onBufferReceived. However, there are no promises that this method will be called, and when I implemented it, it never got called. Is there any way to force this

How to check strength (intensity) of audio while recording?

旧街凉风 提交于 2019-12-09 05:51:00
问题 I am working on a voice recorder application. I want to know is there any way to find strength of the audio while recording it. I don't want to save the recording anywhere. I just want to show user if the sound being caught by the mic is louder then a predefined threshold or not. Let's say if the sound being caught in below 2 decibel, it should show "low" in a red canvas. As soon as sound gets louder and passes 2 decibel threshold the canvas should turn green and show "high" message. Is it

Trying to write functions that record and play sound through WinAPI

半城伤御伤魂 提交于 2019-12-08 05:31:48
问题 I'm trying to create 2 functions in C : One that record the microphone for X seconds One that gets a recording, and play it to the user This is what I wrote : #include <iostream> #include <Windows.h> using namespace std; #pragma comment(lib, "winmm.lib") WAVEHDR StartRecord(int seconds) { const int NUMPTS = 44100 * seconds; int sampleRate = 44100; short int *waveIn = new short int[NUMPTS]; HWAVEIN hWaveIn; WAVEHDR WaveInHdr; MMRESULT result; WAVEFORMATEX pFormat; pFormat.wFormatTag = WAVE

Trying to write functions that record and play sound through WinAPI

℡╲_俬逩灬. 提交于 2019-12-08 04:14:22
I'm trying to create 2 functions in C : One that record the microphone for X seconds One that gets a recording, and play it to the user This is what I wrote : #include <iostream> #include <Windows.h> using namespace std; #pragma comment(lib, "winmm.lib") WAVEHDR StartRecord(int seconds) { const int NUMPTS = 44100 * seconds; int sampleRate = 44100; short int *waveIn = new short int[NUMPTS]; HWAVEIN hWaveIn; WAVEHDR WaveInHdr; MMRESULT result; WAVEFORMATEX pFormat; pFormat.wFormatTag = WAVE_FORMAT_PCM; pFormat.nChannels = 1; pFormat.nSamplesPerSec = sampleRate; pFormat.nAvgBytesPerSec = 2 *

Java Voice Server Not Working

两盒软妹~` 提交于 2019-12-08 03:49:33
问题 I am trying to make a voice server and the server is throwing this error "javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 8000.0 Hz, 8 bit, mono, 1 bytes/frame, not supported." . Here is my code, Thank you in advance public class VoiceUser extends Thread { // CHAT USER private ObjectOutputStream clientOutput; public VoiceUser(Socket sv) { try { System.out.println("VSTART"); clientOutput = new ObjectOutputStream(sv.getOutputStream()); outputArray.add(clientOutput); }

Incoming voice not getting recorded in Samsung S7, S8 and Gionee A1

我们两清 提交于 2019-12-08 00:35:17
问题 I am using this link to record voice when there is any incoming call. Link Url this approach works fine with all device except when i run this code on Samsung S7 , S8 and Gionee A1 The voice of the other side is not getting recorded. 回答1: Please use this code below to achieve this it works well on all devices. import java.io.File; import java.io.IOException; import java.lang.Exception; import java.util.Date; import java.text.SimpleDateFormat; import android.os.IBinder; import android.app

Java Voice Server Not Working

喜你入骨 提交于 2019-12-06 17:37:32
I am trying to make a voice server and the server is throwing this error "javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 8000.0 Hz, 8 bit, mono, 1 bytes/frame, not supported." . Here is my code, Thank you in advance public class VoiceUser extends Thread { // CHAT USER private ObjectOutputStream clientOutput; public VoiceUser(Socket sv) { try { System.out.println("VSTART"); clientOutput = new ObjectOutputStream(sv.getOutputStream()); outputArray.add(clientOutput); } catch (IOException e) { System.out.println("Can't create stable connection between server and client");

How to send recorded voice in email?

本秂侑毒 提交于 2019-12-06 12:29:02
问题 I am developing a Android Application, In which I need to send voice by email. Ans I want that such flow, record a voice and send mail as a audio file in attachment. and I want that voice should not remaining in phone or SD card. is it possible ? 回答1: Here is what you need, It works with me....... Uri uri = Uri.fromFile(new File(YOUR_DIR, YOUR_FILE_NAME))); Intent it = new Intent(Intent.ACTION_SEND); it.putExtra(Intent.EXTRA_SUBJECT, "TITLE"); it.putExtra(Intent.EXTRA_TEXT, "CONTENT"); it