Sample rate for iPhone audio recording

On the iPhone with the built-in microphone, you're going to get a maximum of 8 kHz. If you use a headset, you can get 44.1 kHz. If you're using the built-in mic and setting your recording sample rate to 44.1 kHz, you're upsampling the audio, which is unnecessary and generates the big files you mention. Also, make sure you record in mono. That cuts the file size in half.

If you always want to record at the best rate, you should ask the hardware:

size = sizeof(sampleRate);
err = AudioSessionGetProperty (kAudioSessionProperty_CurrentHardwareSampleRate,
    &size, &sampleRate);

For voice, you can just always record at 8 kHz. For music, you want the best quality so use the sample rate that the hardware is running.


It depends on what you mean by "optimal". 22.05kHz would still be good enough for most music. 11.025kHz would be more than adequate for recording speech. It all depends on what you're doing with the audio. I recommend using your ear to determine the best rate.

My other recommendation is for you to pick some answers for your questions. 44 is a great sampling rate, but an embarrassingly low acceptance rate.