TextToSpeech(TTS)的控制速度

Mar*_*asa 10 android

有什么方法可以让我更好地控制TTS所说的"如何"而不是"它是什么"?

  • 沥青
  • 发音速度
  • 男/女
  • 还有其他选择吗?

API很短

小智 10

刚刚遇到这个,惊讶没有人回答.

尝试使用setPitch或setSpeechRate.

http://developer.android.com/reference/android/speech/tts/TextToSpeech.html#setPitch(float)


小智 6

使用 TTS 你可以使用这些方法来控制说话

  • addSpeech(String text, String filename) //这个方法添加了一个文本字符串和一个声音文件之间的映射。
  • getLanguage() ////这个方法返回一个描述语言的Localeinstance。
  • isSpeaking()//该方法检查TextToSpeech引擎是否正在讲话。
  • setPitch(float pitch)//该方法设置TextToSpeech引擎的语音音调。
  • setSpeechRate(float SpeechRate)//该方法设置语速。
  • shutdown()//该方法释放TextToSpeech使用的资源
  • stop()//这个方法停止发言。