TextToSpeech(TTS)的控制速度

时间:2012-01-06 01:34:38

标签: android

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

  • 间距
  • 发音速度
  • 阳/阴
  • 还有其他选择吗?

The API comes up short

2 个答案:

答案 0 :(得分:9)

刚刚遇到这个并且没有人回答。

尝试使用setPitch或setSpeechRate。

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

答案 1 :(得分:3)

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

  • addSpeech(String text,String filename) //此方法在文本字符串和声音文件之间添加映射。
  • 使用getLanguage() ////此方法返回描述语言的Localeinstance。
  • isSpeaking()//此方法检查TextToSpeech引擎是否正忙于说话。
  • setPitch(float pitch)//此方法设置TextToSpeech引擎的语音音高。
  • setSpeechRate(float speechRate)//此方法设置语速。
  • shutdown()//此方法释放TextToSpeech
  • 使用的资源
  • stop()//此方法停止讲话。
相关问题