I'm working on ZoomMeetingSDK
integration for my Mac app. SDK streams audio buffers once a user joins the meeting. I'm trying to convert these audio buffers into AVAudioPCMBuffer
so that i can generate a live transcripts by leveraging SFSpeechAudioBufferRecognitionRequest
.
Audio buffer object I'm receiving from zoomSDK.
@interface ZoomSDKAudioRawData : NSObject
-(BOOL)canAddRef;
-(BOOL)addRef;
-(int)releaseData;
-(char*)getBuffer;
-(unsigned int)getBufferLen;
-(unsigned int)getSampleRate;
-(unsigned int)getChannelNum;
@end
ZoomSDKAudioRawData.getBuffer()
is in UnsafeMutablePointer<CChar>?
type, I need to generate AVAudioPCMBuffer
type using this buffer and few other properties that ZoomSDKAudioRawData has. ZoomSDKAudioRawData documentation.
Also Zoom mentions that Audio streams are in PCM format. so i assume this can be convertible into AVAudioPCMBuffer
. Can someone help me solve this?