Android text to speech in different languages

I want to create an application that can support different languages.

No problem with "standard" languages:

tts.setLanguage(Locale.ENGLISH); 

And also some others:

 Locale l = new Locale("ru","RU"); tts.setLanguage(l); 

But many others do not work, for example:

 Locale l = new Locale("hu","HU"); tts.setLanguage(l); 

I also tried "hu", "hu-hu", "hu-rHU", "hu" ... but nothing ...

In addition, it does not work with Turkish, Greek, Dutch, Czech ...

+8
java android locale
source share
2 answers

Not all are supported, use: Locale.getAvailableLocales () to get available locales and test them against isLanguageAvailable , or with api21 you can use getAvailableLanguages ​​() to directly get available languages ​​for the current TTS engine. You can install an alternative TTS engine, i.e. SVOX is not bad.

+6
source share

When entering a locale. a drop-down list opens, and the available languages ​​are listed below:

  1. Korean
  2. Italian
  3. Deutsch
  4. Japanese
  5. French
  6. English
  7. Canada_French
  8. Chinese
  9. Simplified_Chinese
  10. Taiwan
  11. Traditional chinese
  12. Great Britain
  13. USA

Currently there are no available Hungarian (Magyarul), Turkish (Turkic).

enter image description here

0
source share

All Articles