'How to change the speed of speech in amazon polly (python)

I want to lower the speed at which the tts speaks at, I searched around for a couple of hours, but can't find the answer. Please help. Thank You in advance.



Solution 1:[1]

From Voice Speed - Amazon Polly:

Amazon Polly helps you slow down the rate of speech using the SSML tag, as in:

<speak>
     In some cases, it might help your audience to <prosody rate="85%">slow 
     the speaking rate slightly to aid in comprehension.</prosody>
</speak>

or

<speak>
     In some cases, it might help your audience to <prosody rate="slow">slow 
     the speaking rate slightly to aid in comprehension.</prosody>
</speak>

Python can use the boto3 AWS SDK, which has a synthesize_speech() API call that accepts a Text field with the text to convert into speech. If you also set TextType='ssml', then the text can include SSML as shown in the example above.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1