Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text to Speech setLanguage() does not work

Tags:

android

I am using Text to Speech.

When I set the language using

mTts = new TextToSpeech(this, this);
mTts.setLanguage(Locale.UK)

I always get an American accent.

The only way to fix this is by changing the default language setting in the Android system. What am I doing wrong?

like image 925
jax Avatar asked Feb 09 '10 12:02

jax


1 Answers

SOLVED

Instead of putting it inside onActivityResult() put it inside onInit(int status) and it works

like image 57
jax Avatar answered Nov 03 '22 01:11

jax