I'm trying to use the new SpeechTranscription API's to do on device transcription. I think I'm close using the example from https://github.com/twilio/video-quickstart-ios/blob/master/AudioSinkExample/AudioSinks/ExampleSpeechRecognizer.m but running into an issue because the audio is coming in as mono but the new API no longer allows you to pass in a CMSampleBufferRef, it has to be an AVAudioPCMBuffer. I tried using the code to convert the sample but running into a status error of 50 when I do, possibly b/c the audio is already mono? If this outside the scope of this repo I understand, but just wanted to see if it was possible to get a AVAudioPCMBuffer from the renderSample methd.
I'm trying to use the new SpeechTranscription API's to do on device transcription. I think I'm close using the example from https://github.com/twilio/video-quickstart-ios/blob/master/AudioSinkExample/AudioSinks/ExampleSpeechRecognizer.m but running into an issue because the audio is coming in as mono but the new API no longer allows you to pass in a CMSampleBufferRef, it has to be an AVAudioPCMBuffer. I tried using the code to convert the sample but running into a status error of 50 when I do, possibly b/c the audio is already mono? If this outside the scope of this repo I understand, but just wanted to see if it was possible to get a AVAudioPCMBuffer from the renderSample methd.