Skip to content

How to get word time stamp events using Azure TTS

szhaomsft edited this page Dec 23, 2019 · 2 revisions

Azure TTS can return the audio time stamp and the words spoken from the SDK. With this feature, in Microsoft Edge, the word can be highlighted when it is reading out. It is a useful feature for immersive reading scenario like ebook reading.

Here is a sample. Look at SynthesisWordBoundaryEventAsync function in this sample file:

https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/1d1b13a7ab154cb884c9db1be3f22a0a8a876301/samples/csharp/sharedcontent/console/speech_synthesis_samples.cs