I have found that I get this exception also when I try to do something like TextToSpeech.getDefaultVoice
, or TextToSpeech.getVoices()
, or TextToSpeech.getVoice()
. I worked around this by not calling them, and instead working through the default Locale to get what I was trying to get via the Voices object.
So in my case I wanted to know the Locale so I could select a language, so I did the following
Locale lTest = Locale.getDefault();
res = mTTS.isLanguageAvailable(lTest);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…