Reputation: 115
I am using microsoft-cognitiveservices-speech-sdk in react for text to speech. I want to run a specific function when the text is finished being spoken. However I am unable to find a way to detect the end of the speech using the sdk. I just need a way to detect when the audio is finishd playing by the sdk so I can run my function
Upvotes: 1
Views: 705
Reputation: 426
The SDK has a onAudioEnd
event, see this sample.
Also, remember to close the synthesizer
, see this question for details.
Upvotes: 4