使用 Twilio 进行语音转文本

Speech to Text using Twilio

我们的聊天机器人使用 Microsoft botframework。我们希望为我们的机器人启用语音通道。有办法解决这个问题吗? Twilio 是否有任何可以为我们的机器人添加语音功能的东西。我们的机器人通过网络聊天组件、Skype、Facebook Messenger 等暴露出来。

这里是 Twilio 开发人员布道者。

Botframework 中无法添加来自 Twilio 的语音功能,但接听电话的工作方式类似。 When someone calls your Twilio number you receive a webhook which you can respond to with TwiML 告诉 Twilio 如何处理调用。

然后通过语音操作执行操作,您可以<Record> the caller's response and set the transcribe parameter to true. You also need to set a transcribeCallback URL as the transcription is done asynchronously. Once you receive that callback, the text of the transcription will be available as a parameter in the request. You could also perform the transcription yourself with a third party service by just taking the recording并发送它。

收到转录后,您可以在下一步的对话中做出决定,redirect the live call to the next step of your process using the REST API

这只是您如何完成此任务的高级概述。如果有帮助请告诉我。

Voximal 提供与 Twillo 类似的产品,但基于 VoiceXML。不同之处在于,Voximal 在解决方案中原生集成了大多数 STT 引擎(Microsoft、Google、Watson、iSpeech)(您只需要设置密钥或 user/password 来配置它们)。您使用内置语法 "text" 进行翻译。然后处理与 Twilio 非常相似。您需要将内容推送到聊天机器人引擎 (HTTP/XML/JSON),并且您有办法使用 TTS 引擎播放结果。 查看 Parrot 示例(使用 STT 和 TTS 重复您所说的所有内容的脚本):

https://github.com/voximal/voicexml-examples/blob/master/parrot/parrot.vxml