Yuvraj Singh
Yuvraj Singh

Reputation: 115

How to detect end of speech in microsoft-speech tts sdk

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

Answers (1)

Yulin Li
Yulin Li

Reputation: 426

The SDK has a onAudioEnd event, see this sample.

Also, remember to close the synthesizer, see this question for details.

Upvotes: 4

Related Questions