1

Which audio format is small in size for speech recording in ios? The quality is need not to be the best but it should be understandable what user speaks.

jailani
  • 2,260
  • 2
  • 21
  • 45
  • see all links in this post. It may help you http://stackoverflow.com/questions/1761460/supported-audio-file-formats-in-iphone – Mani Mar 13 '14 at 05:55

3 Answers3

0

Assuming you plan to use AVAudioRecorder class, you should provide the recording settings like so -

NSDictionary *recordSettings = [NSDictionary dictionaryWithObjectsAndKeys:
    [NSNumber numberWithInt:AVAudioQualityMin], AVEncoderAudioQualityKey,
    [NSNumber numberWithInt:16], AVEncoderBitRateKey,
    [NSNumber numberWithInt: 2],AVNumberOfChannelsKey,
    [NSNumber numberWithFloat:44100.0], AVSampleRateKey,nil];


NSError* error = nil;
AVAudioRecorder audioRecorder = [[AVAudioRecorder alloc]  
                                  initWithURL:soundFileURL 
                                  settings:recordSettings
                                  error:&error];

Apple's documentation provides details about the settings constants (specifically AVEncoderAudioQualityKey) you could use in your app.

Amar
  • 13,202
  • 7
  • 53
  • 71
indyfromoz
  • 4,045
  • 26
  • 24
0

22.05KHz in mono is more than adequate for speech and is 1/4 the size of 44.1KHz in stereo at the same bit depth. You could likely even try dropping it down to 11.025KHz.

nsdebug
  • 364
  • 2
  • 8
0

Several iOS apps use the Speex encoder for lower-bit rate speech. It's not built-in, but open source source code is available to do the encoding.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153