Skip to content

Capture or Convert output from TVIAudioTrack as AVAudioPCMBuffer #677

@marcato15

Description

@marcato15

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions