Jelly Bean Google Voice text-to-speech API?

我的未来我决定 提交于 2019-12-01 05:27:27

问题


Is there a way I can use the text-to-speech from the new Google Voice? In Jelly Bean the pronunciation is really smooth so I was thinking may be there is some kind of API for access to that service?

Thanks!


回答1:


Yes, it is possible to access the Google Now voice using the Android TTS APIs. You need to use "KEY_FEATURE_NETWORK_SYNTHESIS" in the "params" parameter for the TextToSpeech.speak() call.

See

http://developer.android.com/reference/android/speech/tts/TextToSpeech.Engine.html#KEY_FEATURE_NETWORK_SYNTHESIS

and

http://developer.android.com/reference/android/speech/tts/TextToSpeech.html#speak(java.lang.String,int,java.util.HashMap)




回答2:


Have you tried to use just the standard TextToSpeech class?

See Reference for usage. You can pass a "engine" string to the constructor. If the JB TTS Engine appears as a different engine you could choose it there. But I assume that the new JB TTS engine is used automatically if you just select the standard TTS engine.



来源:https://stackoverflow.com/questions/11382621/jelly-bean-google-voice-text-to-speech-api

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