I was looking for a similar thing, and it looks like there really is no such method. But since 1.0 is the normal speed of speech , I solved it by storing the speed in my variable. I have a class that provides several methods for working with TTS, so here is my implementation:
public class MyTts { private static float rate = 1.0f; ... public float getSpeechRate() { return rate; } public int setSpeechRate(float rt) { rate = rt; return tts.setSpeechRate(rate); } ... }
Where setSpeechRate returns TextToSpeech.ERROR or TextToSpeech.SUCCESS according to the documentation.
Edit: It looks like when I set the speed, i.e. 1.5f, and then back to 1.0f, this is not the same. It depends on the tts settings in Android.
Micer
source share