microsoft / Broadcast-Development-Kit

Tools for Broadcasters utilizing Teams
MIT License
57 stars 24 forks source link

Can I stream an individual participant's audio? #35

Open HaoTao95 opened 3 years ago

HaoTao95 commented 3 years ago

When I stream the audio for an individual participant of Teams meeting, it seems that it streams the whole meeting's audio. Is there a solution for individual audio streaming?

JonatanMedinilla commented 3 years ago

Hi @HaoTao95, at the moment BDK and the SDK's we use don't support isolated audio. There is a workaround but you have to modify the codebase on your own. In the following Bot Media SDK document we can observe that we can configure the AudioSocketSettings to receive the unmixed buffers. As the documentation says, you will only receive the top four active speakers (you won't be able to receive all participants' audio) and the bot will receive only unmixed audio and not both unmixed and mixed. Also, the unmixed audio is optimized for machine cognition rather than for human perception, so some concealment treatments aren't applied to the received audio streams in the unmixed mode. If you want to move forward with this workaround, you should modify how the local media session is created, and how the audio buffers are handled.