• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Problem with Text To Speech api

ulasoc

Lurker
May 7, 2015
3
0
I have problem with pronouncing Turkish characters using Google tts api. It does't say anything when i use Utf8 char for example "ş","ı","ö". How can i solve it?

Code:
 public void onInit(int status) {
        if (status == TextToSpeech.SUCCESS) {
            Locale locale = new Locale("tr", "TR");
        int    result = tts.setLanguage(locale);
           
          
            if (result == TextToSpeech.LANG_MISSING_DATA
                    || result == TextToSpeech.LANG_NOT_SUPPORTED) {
                Log.e("TTS", "This Language is not supported");
            } else {
                bCevir.setEnabled(true);
                speakOut();
            }
        } else {
            Log.e("TTS", "Initilization Failed!");
        }
    }
   
   
    private void speakOut() {
        String Str = null;
        Str="Nasılsın";
       
        tts.speak(Str, TextToSpeech.QUEUE_FLUSH, null);
    }
     
}
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones