Search code examples
amazon-polly

Tracking progress of AWS Polly speech


Is there an event or something that could be used to indicate what word is being spoken currently?

I can't find anything in the documentation but I want to double check.

I need that so, e.g., it's possible to move back X words.

Thank you


Solution

  • Polly can generate speech marks, i.e. the position and timing of each word. Using this information, you could certainly achieve what you have in mind.

    To generate speech marks, simply call the SynthesizeSpeech API using the 'json' output format.

    https://docs.aws.amazon.com/polly/latest/dg/using-speechmarks.html