Open sinajia opened 6 months ago
function audioEnd () { console.log('audioEnd'); }
const player = new speechsdk.SpeakerAudioDestination(); player.onAudioEnd = audioEnd; const audioConfig = speechsdk.AudioConfig.fromSpeakerOutput(player); const synthesizer = new speechsdk.SpeechSynthesizer(speechConfig, audioConfig);
After the sound is played, the end event function is not executed.
1.36.0 (Latest)
Chrome
No response
You must add synthesizer.close(() => {}) within the synthesisCompleted event, and then it will trigger as expected.
What happened?
function audioEnd () { console.log('audioEnd'); }
const player = new speechsdk.SpeakerAudioDestination(); player.onAudioEnd = audioEnd; const audioConfig = speechsdk.AudioConfig.fromSpeakerOutput(player); const synthesizer = new speechsdk.SpeechSynthesizer(speechConfig, audioConfig);
After the sound is played, the end event function is not executed.
Version
1.36.0 (Latest)
What browser/platform are you seeing the problem on?
Chrome
Relevant log output
No response