To get timestamps in Azure Text to Speech synthesized audio, you need to use the SSML (Speech Synthesis Markup Language) with the wordBoundary or sentenceBoundary tag and enable the prosody feature.
Use SSML with wordBoundary or sentenceBoundary:
Azure Text to Speech supports adding SSML tags to capture word or sentence boundaries in the synthesized speech. These tags generate timestamps for each word or sentence. Enable Timestamps in API Request:
You need to set the IncludeWordBoundary or IncludeSentenceBoundary in the synthesis request.