In my android TTS application, I tried to speak out Japanese. So, I set the language to Japanese.
result = tts.setLanguage(Locale.JAPAN);
finalText = textField.getText().toString();
tts.speak(finalText , TextToSpeech.QUEUE_ADD, null);
This didn't work. So I set to
result = tts.setLanguage(Locale.JAPANESE);
finalText = textField.getText().toString();
tts.speak(finalText , TextToSpeech.QUEUE_ADD, null);
This also didn't work.
The wonderful case is, any other language except English is not working!!!!!!!!!!!!!!!
This is the text I tried to speak
私は英雄です。だから問題は何ですか?
So my question is, what is happening here? Can't it speak out other languages?
UPDATE
This started working as soon as I set the language in onInit()
. Previously, I tried to set on user request, which means, onInit()
is not called when the user manually change the language from US to Japanese. So, how can I call the OnInit()
manually, without restarting the activity?