Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android TextToSpeech Rate, Sound speaker

I have made an app using TextToSpeech Class.. But the voice rate is too slow .. How to increase the rate of Voice..

Secondly the voice comes from the main(small) speaker.. I want that the Sound Should come from the back speaker(LoudSpeaker).

like image 857
Shah Avatar asked Dec 13 '25 01:12

Shah


1 Answers

1) Use function setSpeechRate to make voice faster

Speech rate. 1.0 is the normal speech rate, lower values slow down the speech (0.5 is half the normal speech rate), greater values accelerate it (2.0 is twice the normal speech rate).

2) Use function setSpeakerphoneOn to turn On rear Speakerphone.

AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);
audioManager.setSpeakerphoneOn(true); 
like image 194
asktomsk Avatar answered Dec 14 '25 16:12

asktomsk



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!