Fix frequest exception android.os.Parcel.readException

This commit is contained in:
Victor Shcherb 2017-05-29 21:45:29 +02:00
parent 9061474aca
commit b5f3f74726

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:
try {
mTts.setLanguage(newLocale);
} catch(Exception e) {
e.printStackTrace();
mTts.setLanguage(Locale.getDefault());
}
if(speechRate != 1) {
mTts.setSpeechRate(speechRate);
}