final SpeechSynthesis synth = new SpeechSynthesis(getContext(), mCallback); | final SpeechSynthesis synth = new SpeechSynthesis(getContext(), mCallback); | ||||
mVoices = new HashMap<String, Voice>(); | mVoices = new HashMap<String, Voice>(); | ||||
for (Voice voice : synth.getAvailableVoices()) { | for (Voice voice : synth.getAvailableVoices()) { | ||||
assertThat(mVoices.get(voice.name), is(nullValue())); | |||||
mVoices.put(voice.name, voice); | mVoices.put(voice.name, voice); | ||||
} | } | ||||
assertThat(mVoices, is(notNullValue())); | assertThat(mVoices, is(notNullValue())); |
if (name.equals("fa-pin")) { | if (name.equals("fa-pin")) { | ||||
// Android locales do not support scripts, so fa-Latn is not possible for Farsi Pinglish: | // Android locales do not support scripts, so fa-Latn is not possible for Farsi Pinglish: | ||||
locale = null; | locale = null; | ||||
} else if (identifier.equals("asia/fa-en-us")) { | |||||
locale = null; | |||||
} else if (name.equals("om")) { | } else if (name.equals("om")) { | ||||
// This is an experimental voice that is not currently well tested to be used. | // This is an experimental voice that is not currently well tested to be used. | ||||
locale = null; | locale = null; |