question

YuvrajSingh-1699 avatar image
1 Vote"
YuvrajSingh-1699 asked ramr-msft edited

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

azure-cognitive-servicesazure-speech
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered ramr-msft edited

@YuvrajSingh-1699 Thanks for the question. SDK has a onAudioEnd event that can be used. The below question that can help for this issue.
https://stackoverflow.com/questions/62564402/microsoft-cognitive-tts-onaudioend-event-not-working

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.