microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

Get Audio bytes when `ReceiveUnmixedMeetingAudio` is set to `true`

Open
#431 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

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) .

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CallHandler.cs and the OnAudioMediaReceived handler, comparing e.Buffer.Data with e.Buffer.UnmixedAudioBuffers[0].Data and the reported lengths. Determine which buffer and audio representation should be supplied to the Microsoft speech-to-text service, and document what confirms that the extracted bytes are valid for transcription.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.