views:

399

answers:

1

In my iPhone app I have voice recording functionality the utilizes Audio Queue voice recording functions of the SDK. I'm saving directly to CAF format and using the following settings for the AudioStreamBasicDescription reference:

audioFormat.mFormatID = kAudioFormatLinearPCM;

I can see that there are other format ids I could use like:

kAudioFormatLinearPCM kAudioFormatAppleLossless kAudioFormatAppleIMA4 kAudioFormatiLBC kAudioFormatULaw kAudioFormatALaw

My knowledge of sound formats is very limited so my question is... which of these should I use to create the lowest compressed audio recording files? Plus, are there other settings I should apply to lower the quality and filesize even further?

A: 

If you are trying to create the smallest files possible then you want to use the audio codec with the highest compression, which is iLBC. iLBC is short for Internet Low Bitrate Codec. It's generally about 7MB per hour of recording. The tradeoff with iLBC--and any other codec for that matter--is that the more compressed the codec, the lower the quality of audio.

The other setting you can use to reduce file size is to decrease your sample rate. The iLBC format generally works well with a sample rate of 8000 hertz.

Harkonian