I notice that AVAudioSession.sharedInstance().sampleRate
is 48000, while AVAudioEngine().inputNode.inputFormat(forBus: 0)
shows me a sample rate of 44100. When I do try AVAudioSession.sharedInstance().setPreferredSampleRate(16000)
it sets the input node sample rate, not the session sample rate. So my question is, what's the difference between the two sample rates?
I am trying to live record speech audio at 16kHz, but the audio comes out sounding distorted and metallic. I was wondering if it had something to do with the mismatch of these sample rates.