Reputation: 395
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).
Upvotes: 2
Views: 4849
Reputation: 28144
It is not clear, if you want to increase the volume of the voice : you can use the method setStreamVolume()
on your AudioManager
(example : here)
If you want to have a faster voice, try to use this method setSpeechRate()
or your TextToSpeech
class. (more information : here)
About your last question, did you try to change the method setSpeakerPhoneOn()
in order the speaker? (AudioManager setSpeakerPhoneOn)
Upvotes: 3
Reputation: 2298
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);
Upvotes: 10