在Android (Kotlin)上的TextToSpeech不支持日语,我想知道我是否遗漏了一些东西,或者日本开发者正在做什么?
我将非常感激任何想法,将告诉我转身,这样我可以使用这个语言和TexteToSpeech,而不是。mp3。
...
if (status == TextToSpeech.SUCCESS) {
// set the language for tts
val result = tts!!.setLanguage(Locale.JAPAN)
if (result == TextToSpeech.LANG_MISSING_DATA
|| result == TextToSpeech.LANG_NOT_SUPPORTED) {
showTheToast("Japanese not supported!")
Log.e("TTS", "Japanese is not supported! :-(")
} else {
tts!!.setSpeechRate(1.0f)
}
} else {
showTheToast("The initialization failed!")
}
...
感谢您花时间阅读。
抱歉,我是Android新手。
我现在看到它需要用谷歌Engine为tts安装我们想要的语言。这就是答案