Fix frequest exception android.os.Parcel.readException

This commit is contained in:
Victor Shcherb 2017-05-29 21:45:29 +02:00
parent d6791fc248
commit b2bc263a20

View file

@ -209,7 +209,12 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
case TextToSpeech.LANG_COUNTRY_AVAILABLE:
ttsVoiceName = "".equals(ttsVoiceName) ? newLocale.getDisplayName() + ": LANG_COUNTRY_AVAILABLE" : ttsVoiceName;
case TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE:
mTts.setLanguage(newLocale);
try {
mTts.setLanguage(newLocale);
} catch(Exception e) {
e.printStackTrace();
mTts.setLanguage(Locale.getDefault());
}
if(speechRate != 1) {
mTts.setSpeechRate(speechRate);
}