avaudiorecorder

Access to microphone for recording via code, iOS

你。 提交于 2019-12-11 20:21:48
问题 In my App am using AVAudioRecorder for recording. There is no problem regarding the recording. When I play my app for the first time, the problem is that an alertview pop ups, regarding allow/dis allow the microphone to be used. I want to have 1) control over this default alertview, so that my recording and timer (a label that is used to show the seconds, audio recorded) starts only when I click on Allow microphone, OR 2) need to set microphones available for the app, so that It doesn't

AVAudioRecorder Settings did not take effect on output file

只愿长相守 提交于 2019-12-11 18:37:13
问题 I'm using AVAudioRecorder to record and save to an audio.m4a file with these settings: NSMutableDictionary *recordSetting = [[NSMutableDictionary alloc] init]; [recordSetting setValue:[NSNumber numberWithInt:AVAudioQualityMin] forKey:AVEncoderAudioQualityKey]; [recordSetting setValue:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey]; [recordSetting setValue:[NSNumber numberWithInt:16] forKey:AVEncoderBitRateKey]; [recordSetting setValue:[NSNumber numberWithFloat:44100.0]

implementing Queue Services in AV Audio Recorder using Swift

蹲街弑〆低调 提交于 2019-12-11 06:24:59
问题 Is it possible to create a buffer concept similar to AudioQueue services in AVRecorder Framework. In my application , i need to capture the Audio buffer and send it over the Internet. The server connection part is done, but i wanted to know if there is a way to record the voice continuously in the foreground, and pass this audio buffer by buffer at the background to the server using Swift . Comments are appreciated. 回答1: AVAudioRecorder records to a file, so you can't easily use it to stream

Confusion with meters in AVAudioRecorder

浪子不回头ぞ 提交于 2019-12-10 16:53:46
问题 Simply put, I'm trying to lip-sync something based on the decibel reading from the mic input stream of an iPhone, and the values I'm getting aren't quite what I'm after. I'm using AVAudioRecorder's peakPowerForChannel and averagePowerForChannel. (I'm aware that this is a rather simplistic lip-sync technique, but quality isn't a major concern). When the number of decibels increases, the meters react as I'd like them to (higher value when louder, so I can map this to the open-ness of the mouth)

Android: AudioRecord Error code -20 when initializing native AudioRecord object

吃可爱长大的小学妹 提交于 2019-12-10 13:49:49
问题 Android: I want to read buffers from mic so that i can perform process on it, Following is my code int sampleRateInHz = 8000;// 44100, 22050 and 11025 int channelConfig = AudioFormat.CHANNEL_CONFIGURATION_MONO; int audioFormat = AudioFormat.ENCODING_PCM_16BIT; //int bufferSize =11025 + int bufferSize = AudioRecord.getMinBufferSize(sampleRateInHz,channelConfig, audioFormat); short[] buffer = new short[bufferSize]; AudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,

AVAudioPlayer and AVAudioRecorder: Delegate Methods not Called

不想你离开。 提交于 2019-12-10 09:34:21
问题 My delegate methods audioRecorderDidFinishRecording and audioPlayerDidFinishPlaying are not being called. Those methods should trigger a 'stopanimation` method that stops an animation after recording is finished. I have placed a call call to the stopanimation method at the end of audioPlayerDidFinishPlaying . Here is the relevant code where the delegate is assigned: VoiceEditor.h @interface VoiceEditor : UIViewController <UITextFieldDelegate, AVAudioRecorderDelegate, AVAudioPlayerDelegate>{ }

iOS 7 m4a to mp3 encoding - is it possible?

久未见 提交于 2019-12-09 22:53:35
问题 I've searched through all the internet and didn't find a clear answer on my question - How do you record an m4a file (because as this answer states iOS doesn't support mp3 recording) and later convert it to mp3 ? Recording an audio file seemed to be a piece of cake, but then the nightmare began. It's 2013 around and I haven't found any clear example of this procedure on the web. Some people say you can't do it because of some GPL license. Others suggest to use Apple's examples which never

recorder works on iPhone 3GS but not on iPhone 3G

瘦欲@ 提交于 2019-12-09 19:33:17
问题 I have a AVAudioRecorder, which gets initialized like: _recorder = [AVAudioRecorder alloc]; NSMutableDictionary *recordSettings = [[[NSMutableDictionary alloc] initWithCapacity:2] autorelease]; [recordSettings setObject:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey: AVFormatIDKey]; [recordSettings setObject:[NSNumber numberWithInt:AVAudioQualityLow] forKey: AVEncoderAudioQualityKey]; NSURL *url = [NSURL fileURLWithPath:[self getActualSoundPath]]; [_recorder initWithURL:url settings

iOS: How to trim silence from start and end of .aif audio recording?

◇◆丶佛笑我妖孽 提交于 2019-12-09 12:59:49
问题 My app includes the ability for the user to record a brief message; I'd like to trim off any silence (or, to be more precise, any audio whose volume falls below a given threshold) from the beginning and end of the recording. I'm recording the audio with an AVAudioRecorder, and saving it to an .aif file. I've seen some mention elsewhere of methods by which I could have it wait to start recording until the audio level reaches a threshold; that'd get me halfway there, but won't help with

Record And Play Voice in Separate Class (Swift3)

纵饮孤独 提交于 2019-12-08 08:56:11
问题 I used many codes that was for record an play the voice, but most of them are not in swift3 and they don't work in my app. This code works, but I want to create a separate class from the viewcontroller that do recording an playing voices. Also the mentioned github code is complex an I'm searching for a simplified code. Update: After recording, when I check existence of the recorded file, the file doesn't exist, and it raises EXC_BAD_ACCESS error on appDelegate. What's wrong? Any suggestions