TextToSpeech has a way to set the speech rate: setSpeechRate(). But it doesn't have an opposite method of querying the current speed.
Is there a way to query the system for that value?
TextToSpeech has a way to set the speech rate: setSpeechRate(). But it doesn't have an opposite method of querying the current speed.
Is there a way to query the system for that value?
I was looking for similar thing and it seems like there really isn't such a method. But since 1.0 is the normal speech rate, I solved it by keeping the rate in my own variable. I have a class that provides few methods to work with TTS, so here's my implementation:
Where
setSpeechRate
returnsTextToSpeech.ERROR
orTextToSpeech.SUCCESS
according to documentation.Edit: Seems like when I set rate to i.e. 1.5f and then back to 1.0f it's not the same. It depends on tts settings in Android.
You may get default TTS speech rate