Is it possible to record audio through the microphone of AirPod Pros at a sample rate higher than 16kHz?
I'm tapping into the microphone bus using audioEngine
:
let node = audioEngine.inputNode
let recordingFormat = node.outputFormat(forBus: 0)
node.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) { [unowned self] (buffer, _) in
self.request!.append(buffer)
}
audioEngine.prepare()
do {
try audioEngine.start()
} catch {
fatalError("\t[Error] There was a problem starting speech recognition")
}
It seems as though the default sample rate (found in recordingFormat
) is 16000Hz, and I've had difficulty specifying a higher sample rate.
This particular sample rate returns an audio recording with fairly low quality compared to a recording from the iPhone microphone, which has a sample rate of 44100Hz.