I want to speech the words in Hindi in my application. Following this link: www.androidhive.info/2012/01/android-text-to-speech-tutorial
but there in availability of Hindi Locale. How can I make the set up for Hindi translations?
I want to speech the words in Hindi in my application. Following this link: www.androidhive.info/2012/01/android-text-to-speech-tutorial
but there in availability of Hindi Locale. How can I make the set up for Hindi translations?
You need to make a change while setting language.
t1 = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
if (status!=TextToSpeech.ERROR) {
t1.setLanguage(new Locale("hin")); // Setting Hindi language
}
}
});
You can set the language as shown in the code above. That worked for me.