Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setting the speech rate in Azure text to speech?

Hello I am trying to configure the speech rate using python with the text to speech services. I need the parameter statement.

like image 737
Dereck Amesquita Avatar asked Sep 17 '25 13:09

Dereck Amesquita


1 Answers

Thanks @ yutongtie-msft , Your answer helped lot.

There are two ways to change the speed rate for Text to Speech.

  1. Create a custom voice. Refer here

  2. SSML language: use the SSML language to control the speaking speed. You can change to use SSML as input to call speech service. Then it can change the speech rate.

    The prosody element is used to specify changes to pitch, contour, range, rate, duration, and volume for the Text-to-Speech output.

< prosody pitch="value" contour="value" range="value" rate="value" duration="value" volume="value"> < /prosody>

Rate Indicates the speaking rate of the text. You can express rate as:

A relative value, expressed as a number that acts as a multiplier of the default. For example, a value of 1 results in no change in the rate. A value of 0.5 results in a halving of the rate. A value of 3 results in a tripling of the rate.

A constant value:

  • x-slow

  • List item

  • slow

  • medium

  • fast

  • x-fast

  • default

Refer here

like image 112
Delliganesh Sevanesan Avatar answered Sep 20 '25 01:09

Delliganesh Sevanesan