Jelly Bean Google Voice text-to-speech API?

前端 未结 2 1135
旧时难觅i
旧时难觅i 2021-01-13 23:44

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 fo

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-14 00:36

    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)

提交回复
热议问题