I am using Azure to implement a bot in Microsoft Teams that you can speak with. The bot is supposed to listen and, after 2 seconds of silence, validate the sentence. However it seems that maxSilenceTimeoutInSeconds and InitialSilenceTimeoutInSeconds have no effect on the duration of the recording since it always wait the full 10 seconds.
const recordAudioClipGraphURL =
'https://graph.microsoft.com/v1.0/communications/calls/' + CommID + '/record'
// RECORD PROMPT
const recordPayload = {
bargeInAllowed: true,
clientContext: 'record-audio-clip-context',
maxRecordDurationInSeconds: 10,
initialSilenceTimeoutInSeconds: 5,
maxSilenceTimeoutInSeconds: 2,
playBeep: true,
stopTones: ['*'],
}
// Send Record
await fetch(recordAudioClipGraphURL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + accessToken,
},
body: JSON.stringify(recordPayload),
})
I have a high quality microphone so I’m sure the problem does not come from ambiant noises.
I also tried not talking at all and the recording still is exactly 10 seconds.
I also saw this post: Cloud Communications API recordResponse initial and max silence but the answer here is wrong and I don’t have enough reputation to comment or answer.