集成第三方文字转语音服务

IBM® Voice Gateway 支持使用语音适配器来集成第三方语音合成(文字转语音)服务以替换 IBM® Text to Speech 服务。适配器是与 Voice Gateway 一起部署的单独 Docker 容器,并且充当介于 Voice Gateway 和第三方语音服务之间的代理。

Voice Gateway 提供以下选项以用于集成第三方语音服务:

Voice Gateway Text to Speech Adapter:Text to Speech Adapter 当前支持 Google Text to Speech API 从文本将语音合成为音频。通过使用 Google Text to Speech API,可以为自助服务代理程序选择其他语音。V1.0.0.7a 和更高版本。

Text to Speech Adapter

Text to Speech Adapter 体系结构

使用 Text to Speech 时,Voice Gateway 中的 Media Relay 容器使用 WebSocket 连接将数据路由到 Text to Speech。通过使用 Text to Speech Adapter,可以将 Voice Gateway 部署连接到第三方文字转语音提供程序。Media Relay 使用 WebSocket 连接来连接到 Text to Speech Adapter,而不是使用 WebSocket 连接将部署集成到 Text to Speech。然后,此适配器使用与第三方文字转语音服务的 gRPC 连接来合成音频并将其返回到 Media Relay,由 Media Relay 将音频传送到呼叫者。

在以下示例中,Text to Speech Adapter 将 Voice Gateway 与 Google Text to Speech Beta 服务进行连接。

Text to Speech Adapter 充当 Voice Gateway Media Relay 与第三方文字转语音服务(例如 Google Text to Speech Beta 服务)之间的中介。

部署 Text to Speech Adapter

Voice Gateway Text to Speech Adapter 封装为单独 Docker 映像,您需要与核心 SIP Orchestrator 和 Media Relay 映像一起配置和部署此映像。部署 Text to Speech Adapter 之前,请部署基本 Voice Gateway 实例,如 Voice Gateway 入门中所述。然后,在以下页面中详细了解如何将 Text to Speech Adapter 添加到部署中:

配置 Text to Speech Adapter

要设置 Text to Speech Adapter,可以定义以下类型的配置。