I am working on a bot that is supposed to attend group calls/online meetings. The bot needs to access audio spoken by each participant that will be send to transcription service at the end of the meeting. In CallHandler.cs we can add an event handler OnAudioMediaReceived(object sender, AudioMediaReceivedEventArgs e), where we can get the audio buffers for each speaker. My question is, where can I find the byte array against each speaker. When event handler is fired e.Buffer.Data always returns '0's while there are audio bytes in e.Buffer.UnmixedAudioBuffers[0].Data. So I am creating a byte array out of it and adding that to a generic list which will be parsed once the meeting is ended, to generate the transcript:
byte[] managedByteArray = new byte[e.Buffer.UnmixedAudioBuffers[0].Length];
int length = (int)e.Buffer.UnmixedAudioBuffers[0].Length;
Marshal.Copy(e.Buffer.UnmixedAudioBuffers[0].Data, managedByteArray, 0, length);
this.AudioByteArrayList.Add(managedByteArray);
I just want to make sure that am I getting the audio bytes in a correct way? as I am not getting desired results from speech to text service ( I am using cognitive speech service provided by Microsoft for transcription) .
I am working on a bot that is supposed to attend group calls/online meetings. The bot needs to access audio spoken by each participant that will be send to transcription service at the end of the meeting. In
CallHandler.cswe can add an event handlerOnAudioMediaReceived(object sender, AudioMediaReceivedEventArgs e), where we can get the audio buffers for each speaker. My question is, where can I find the byte array against each speaker. When event handler is firede.Buffer.Dataalways returns '0's while there are audio bytes ine.Buffer.UnmixedAudioBuffers[0].Data. So I am creating a byte array out of it and adding that to a generic list which will be parsed once the meeting is ended, to generate the transcript:I just want to make sure that am I getting the audio bytes in a correct way? as I am not getting desired results from speech to text service ( I am using cognitive speech service provided by Microsoft for transcription) .