microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
212 stars 239 forks source link

Audio format for send and receive #389

Open maimar-sw opened 3 years ago

maimar-sw commented 3 years ago

I am not able to send audio to a meeting using Pcm44KStereo format, but I am able to do it using Pcm16K. From the docs, I understand that the stereo format is for convenience, and the left and right channels have actually the same information. Does this also hold for the sample rate? I mean, is the 44K format a resampled version of the 16K audio? As using Pcm16K for sending forces me to also use Pcm16K for receiving, I want to understand if I will lose quality or just convenience. Thanks!

Edit: I just found this answer which I think reinforces my hypothesis, but I would love to have confirmation if we always get audio in 16K and it gets resampled by the SDK.

ssulzer commented 3 years ago

@maimar-sw Sending audio in stereo format into a Teams meeting is not supported, so a bot which needs to both send and receive audio must use Pcm16K. Right now the Pcm44KStereo format is not very useful for a Teams meeting media bot, incoming audio will just be upsampled from mono 16KHz to 44.1KHz within the SDK (left and right channels will be identical) - use this format only if the bot needs to send audio to something else which requires the format. Thanks.