Changing the default voice of Android's Text To Speech

前端 未结 3 710
野性不改
野性不改 2021-02-04 20:13

I\'m using the Android\'s Text To Speech default engine in my app, however the female\'s voice sounds like a woman over 40 and her voice is somewhat robotic.

3条回答
  •  独厮守ぢ
    2021-02-04 20:43

    Here is my code to use KEY_FEATURE_NETWORK_SYNTHESIS param:

    HashMap onlineSpeech = new HashMap<>();
    onlineSpeech.put(TextToSpeech.Engine.KEY_FEATURE_NETWORK_SYNTHESIS, "true");
    tts.speak(speech, TextToSpeech.QUEUE_FLUSH, onlineSpeech);
    

提交回复
热议问题