audio-recording

Is it possible to record audio in iOS with Codename One?

时光毁灭记忆、已成空白 提交于 2019-12-06 11:34:27
My app features a button to record audio (and another to play it back when the recording is over). I send the recorded audio files on a server. On Android the files is recorded as .amr (mime type audio/amr) and can be played back. On iOS however the file can neither be played back on the device (iPhone 4 or 4S) nor on a computer. ffmpeg -i reports [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2fac120] moov atom not found 9gMjOnnmsj9JJZR3.m4a: Invalid data found when processing input Please note that VLC cannot play it either. I give the m4a extension because Voice recorder uses it (along with aac codec). Here

iOS: Record audio in other format than caf

寵の児 提交于 2019-12-06 09:47:27
I am working on audio recording. I am able to record my audio in caf (Core audio format). Now I want to record sound in .mp3 or .amr . I tried a lot of google but didn't found anything. I am not sure if my steps following work: Write that Audio with .caf extention to document dir Read data from that file write the file again with .mp3 or .amr extention I have 100% doubt that this will not going to work as this will just re save file with some other extension. This won't change audio codec. I thought that for converting any format whether it is audio or video we need to change its codecs and

IOS record audio and split it into files in real time

不问归期 提交于 2019-12-06 09:25:52
I am making an app which needs to stream audio to a server. What I want to do is to divide the recorded audio into chunks and upload them while recording. I used two recorders to do that, but it didn't work well; I can hear the difference between the chunks (stops for couple of milliseconds). How can I do this? Your problem can be broken into two pieces: recording and chunking (and uploading, but who cares). For recording from the microphone and writing to the file, you can get started quickly with AVAudioEngine and AVAudioFile . See below for a sample, which records chunks at the device's

How to change audio recording settings to 16Khz and 16 bit when we record audio?

早过忘川 提交于 2019-12-06 09:13:53
I have the settings shown below. I want change audio recording settings to 16Khz and 16 bit when we record audio. NSArray *dirPaths; NSString *docsDir; dirPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); docsDir = [dirPaths objectAtIndex:0]; NSString *soundFilePath = [docsDir stringByAppendingPathComponent:@"sound.wav"]; NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath]; NSDictionary *recordSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey, [NSNumber numberWithInt:16],

How to save microphone audio input?

不羁岁月 提交于 2019-12-06 07:36:49
问题 I need to save microphone input to use later in an AudioElement. I do this to get microphone input: window.navigator.getUserMedia(audio: true).then((MediaStream stream) { # what should go here? }); What should I do to save the audio? 回答1: There are many horrible stupid examples out there where you are able to play the current audio recording in the current browser window. Is there ever a use case for this. For video I can imaging that one want to build a Skype like application and have a

How to compute decibel (dB) of Amplitude from Media Player?

假如想象 提交于 2019-12-06 07:31:23
问题 I have a code to compute real-time dB Amplitude of AudioRecord. The code works well for computing dB Amplitude. After recording, I save that it to wav file. Now, I want to playback that file and recompute the dB Amplitude. However, I cannot achieve similar result before. Could you help me to fix it. This is my code to compute dB Amplitude when recording and playback. 1.Compute dB amplitude when recording bufferSize = AudioRecord.getMinBufferSize(16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat

Upload audio recorded in browser using html5

半世苍凉 提交于 2019-12-06 06:46:54
问题 I'm a newbie to HTML, Javascript and company, so please forgive me for asking a perhaps obvious question. I'd like to build a webapp where users can upload audio plus some information about themselves. I have a form that looks mostly like this: <form method="post" action="/add_recording" enctype="multipart/form-data"> <label>Name: </label> <input type="text" name="user_name" maxlength="20" size="20" value="Joe"> <br> <label>Audio File: </label> <input type="file" name="user_audio"/> <br>

MediaRecorder throw “java.lang.RuntimeException: start failed: -2147483648” when trying to record audio on LG G Watch

让人想犯罪 __ 提交于 2019-12-06 06:06:46
I am trying to record audio in my app on a LG G Watch. The following code throws RuntimeException with message "start failed: -2147483648" at the statement "recorder.start();". Wondering what I'm doing wrong here. I have tried a lot of different set of parameters, for example for AudioSource: recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); //-and- recorder.setAudioSource(MediaRecorder.AudioSource.MIC); Also for OutputFormat I have tried recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); //-and- recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); //-and- recorder

Detect if another app is requesting the microphone

坚强是说给别人听的谎言 提交于 2019-12-06 05:35:18
I have seen multiple questions on SO that say it is impossible to see when another app wants to use the microphone ( Unable to access microphone when another app is using it in Android ). However, I know it is possible because Shazam has an "Auto" function that allows the exact functionality I want: to continuously listen to audio when other apps are not using the microphone. Currently, when I use my app and use an app like Snapchat, I am unable to record a video with audio because Snapchat does not take the mic over. However, as I said before, in this case Shazam's Auto feature works fine. So

AS3 microphone recording/saving works, in-flash PCM playback double speed

此生再无相见时 提交于 2019-12-06 04:12:03
问题 I have a working mic recording script in AS3 which I have been able to successfully use to save .wav files to a server through AMF. These files playback fine in any audio player with no weird effects. For reference, here is what I am doing to capture the mic's ByteArray: (within a class called AudioRecorder) public function startRecording():void { _rawData = new ByteArray(); _microphone .addEventListener(SampleDataEvent.SAMPLE_DATA,_samplesCaptured, false, 0, true); } private function