mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
eSpeakActivity: revert a workaround for the Parcel error from the eSpeak activity
This commit is contained in:
@@ -198,14 +198,7 @@ public class eSpeakActivity extends Activity {
|
||||
private Locale getTtsLanguage() {
|
||||
if (mTts != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
android.speech.tts.Voice voice = null;
|
||||
try {
|
||||
voice = mTts.getVoice();
|
||||
} catch (NullPointerException e) {
|
||||
// Android Lollipop and later may throw a NullPointerException
|
||||
// if a voice is not selected.
|
||||
return null;
|
||||
}
|
||||
android.speech.tts.Voice voice = mTts.getVoice();
|
||||
if (voice != null) {
|
||||
return voice.getLocale();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user