TSI android 4.1 jellybean

I have English data set for TTS and it works, but when called

tts.isLanguageAvailable(Locale.ENGLISH) 

Always returns -2 (CHECK_VOICE_DATA_MISSING_DATA) on Android 4.1. The only way I passed the test using the Nexus 7 tablet is to install all other TTS data files, French, Italian, etc., after which it reports the correct result. Now I show the user a message about installing files, and the option to install into English is not displayed because it is already installed, in other words, this message is displayed every time the application is used, which is clearly annoying.

Android issue

+4
source share
2 answers

Try checking Locale.US or Locale.UK

+1
source

Locale.US stands for English English ("en_US"). Try passing only "en":

  tts.isLanguageAvailable(new Locale("en")); 
0
source

Source: https://habr.com/ru/post/1438229/


All Articles