Closed DjTeo closed 4 years ago
It's because it gets considered as an anonymous user join. Assuming you've taken parts of the AudioPlaybackBot sample, can you remove this code snippet and try again?
if (!string.IsNullOrWhiteSpace(joinCallBody.DisplayName))
{
// Teams client does not allow changing of ones own display name.
// If display name is specified, we join as anonymous (guest) user
// with the specified display name. This will put bot into lobby
// unless lobby bypass is disabled.
joinParams.GuestIdentity = new Identity
{
Id = Guid.NewGuid().ToString(),
DisplayName = joinCallBody.DisplayName,
};
}
Thank you very much, it worked!
But when nobody is speaking the e.Buffer.UnmixedAudioBuffers
is null instead of an empty array, is this intended?
Yes, this is by design. When no one is speaking e.Buffer.UnmixedAudioBuffers
will be null. It will appear as a silent "mixed buffer" type of a packet. So IsSilence
property on the AudioMediaBuffer
will be true
, the Data
property will point to valid (silence) data, and the Length
will be the length of the silence buffer. We recommend you write this buffer to all the individual .wav files you have for each speaker so that it accounts for the silence in between the speech.
Thank you very much again. That explains a lot.
Describe the issue I am working on the PolicyRecordingBot sample, I have set
new AudioSocketSettings { StreamDirections = StreamDirection.Recvonly, SupportedAudioFormat = AudioFormat.Pcm16K, ReceiveUnmixedMeetingAudio = true, }
and I want to record unmixed audio of a meeting in a file (.wav), I make http call to /JoinCall as in AudioVideoPlaybackBot sample. OnOnAudioMediaReceived
event thee.Buffer.UnmixedAudioBuffers
is always null. I tried to savee.Buffer.Data
to .wav file and it seems that unmixed audio goes there. I tried to listening it and is a fast forward audio with a lot of cuts, like if in every audio buffer frame its changed participants' audio. I didn't have trouble recording mixed audio.Expected behavior I was expected the
e.Buffer.UnmixedAudioBuffers
to have value like the documentation says.Graph SDK :
Call ID 457f835d-5d53-4aa6-ad2d-a1627f84432a
Logs