1

I have one simple application which announces based on the language set in the app. My device supports Portuguese language also but when I set the language in TTS as Portuguese

int result = mTts.setLanguage(new Locale("pt");

returns always -2 means language is not supported but when I see in device's

settings-> Language & keyboard->select language

it is having language Portuguese(Portugal).

NOTE: Device's language is English only, I am just setting Application language as Portuguese.

stema
  • 90,351
  • 20
  • 107
  • 135
piks
  • 1,621
  • 8
  • 32
  • 59

2 Answers2

0

Language support by the Android OS and by the Android TTS engine are two different things. The Android Developers API states that TTS is only available in English, French, German, Italian and Spanish.

THelper
  • 15,333
  • 6
  • 64
  • 104
  • it means if I want to support other languages for TTS then I need to install it separately..is it correct? – piks Apr 25 '12 at 09:08
  • Yes, that is provided you can find a third party TTS that includes your language of choice. For more info on see also [this question](http://stackoverflow.com/q/7362534/741249) – THelper Apr 25 '12 at 10:54
0

This question is quite old and since then, Google has launched a huge update of the TTS engine. Now, Portuguese (Brazil) voice is included.

In my app I use:

 mTts.setLanguage(new Locale("pt", "POR"));

And I see that the device download the data for Portuguese voice (female) and the accent sound very good to me.

Pedro Santangelo
  • 143
  • 2
  • 13