Setting language for TTS programmatically?

后端 未结 1 876
慢半拍i
慢半拍i 2020-12-16 03:41

I have written a small Android Demo to use TTS in different languages. I have a layout with two buttons, Spanish and English. Pressing the button triggers an utterance in th

相关标签:
1条回答
  • 2020-12-16 04:33

    From https://web.archive.org/web/20120505124037/http://developer.android.com/resources/articles/tts.html, you may want to try this:

    Locale loc = new Locale ("spa", "ESP");
    

    Seems odd, but that's what they reference (not es like one would expect).

    0 讨论(0)
提交回复
热议问题