在 Watson 文本转语音中使用不同的语调

Using different intonations with Watson text to speech

我正在使用 Watson 文本转语音和 Watson 对话开发 PoC。

有时候,聊天机器人需要问一个问题,所以我想要文本到语音以使用询问语调合成语音。

可以做吗?

是的,您当然可以使用文本转语音 (TTS) 进行输出,使用语音转文本 (STT) 进行输入。您需要使用中间件或应用程序层来驱动对话并将 input/output 路由到其他服务(参见 "how to use" in the docs)。

我用过以下TJBot recipe as a simple and good started for some projects: https://github.com/damiancummins/tell_the_time

Watson Text to Speech 支持 SSML,并具有富有表现力的 SSML 标签。

您要使用的是Uncertainty。因为它被定义为 "conveys an uncertain, interrogative message".

示例:

<express-as type="Uncertainty">
  Could she still be in the office? She told me that she might leave early.
</express-as>

有关其用法的更多详细信息,请参见此处:

https://console.bluemix.net/docs/services/text-to-speech/SSML-expressive.html#the-express-as-element

不幸的是,连接式 TTS 可能无法在问题中创建正确的语调。如果您认为它一直或经常发生,请打开一个错误。 如果您有一个语调不正确的特定问题,请尽可能尝试改写一下。这个声音的一个有用的技巧可能是使用双问号“??”