Google Text to Speech

与世无争的帅哥 提交于 2020-01-07 03:04:14

问题


I have an application that reads a set of instructions from the parse database and reads them out as they are displayed. I changed my default text to speech from Samsung to Google and now the app reads through the instructions with no commas or intonation. I cannot seems to circumvent this by changing tts.setSpeechRate. Any ideas on how to manipulate the reading by Google text to speech so that the speech makes sense and it not one rolling sentence from one instruction to another?


回答1:


When you construct TextToSpeech instance, use this constructor:

TextToSpeech(Context context, TextToSpeech.OnInitListener listener, String engine);

If you want to use Google TTS, input package name in engine parameter.

Also, you can get TTS engine list that installed your phone with TextToSpeech.getEngines();.

Find package name with this api, then make tts instance with package name.



来源:https://stackoverflow.com/questions/34499438/google-text-to-speech

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!