Soru & Cevap

Andoid TTS Türkçe Karakter Sorunu ...

07.05.2015 - 10:29

Merhaba

Android TTS api kullanıyorum fakat Türkçe karakterleri seslendirmiyor. Örneğin "ı", "ş" gibi. Decimal kodla çözmüştüm ı yerine ı gibi fakat yeni güncelleme ile bunu ı değil 305 olarak okuyor. Utf8'e çevirdim yine olmadı. Nasıl düzeltebilirim? Kod:

[code]

 @Override
    public void onDestroy() {
        // Don't forget to shutdown tts!
        if (tts != null) {
            tts.stop();
            tts.shutdown();
        }
        super.onDestroy();
    }
 
    
    
    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);
    }
  
 

 

 

[/code]

3 Görüntülenme

0 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.