Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to decrease speech rate in google text to speech

I tried several ways to lower the speech rate in google tts android.

 myTTS.setSpeechRate(1/2);

this is not working. This produces the default speed. its not accepting 0.5 (type is float). Someone help

like image 316
SHERIN JOJU Avatar asked Mar 11 '26 09:03

SHERIN JOJU


2 Answers

You need to set the float value correctly:

myTTS.setSpeechRate(0.5f);
like image 185
brandall Avatar answered Mar 13 '26 21:03

brandall


You can use float in this way. This is a sample to adjust the Pitch and SpeechRate

myTTS.setPitch((float)0.7);
myTTS.setSpeechRate((float)0.5);
like image 35
Folahan Sanxy Avatar answered Mar 13 '26 22:03

Folahan Sanxy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!