Fix frequest exception android.os.Parcel.readException
This commit is contained in:
parent
9061474aca
commit
b5f3f74726
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue