I wanted to speak Amharic or some other language text using TextToSpeech API but isn't work.
TextToSpeech tts = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
if (status != TextToSpeech.SUCCESS) {
tts.setLanguage(new Locale("am-ET"));
tts.speak("መንቦግቦግ", TextToSpeech.QUEUE_FLUSH, null, null);
}
}
});
AndroidMenifest.xml
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>