Text to speech setLanguage () not working

I am using Text to Speech.

When I install 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 to change the default language setting in the Android system. What am I doing wrong?

+5
source share
2 answers

solvable

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

+7
source

, tts, . KitKat. tts , getAvailableLanguages() . , , getLanguage() ,

0

All Articles