gpt4 book ai didi

Android 土耳其语文字转语音

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:36:52 26 4
gpt4 key购买 nike

我在使用 Google tts api 发音土耳其语字符时遇到问题。当我使用 Utf8 字符(例如“ş”、“ı”、“ö”)时,它什么也没说。我该如何解决?

    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);
}

}

最佳答案

问题解决了。它与我们或代码无关。这是因为谷歌文本到语音引擎,在上次 TTS 更新后就可以了。

关于Android 土耳其语文字转语音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30109890/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com