【问题标题】:how to set the audio file sample rate for watson text to speech in node-red如何在节点红色中设置 watson 文本到语音的音频文件采样率
【发布时间】:2018-04-13 15:51:38
【问题描述】:

watson 文本转语音接受额外的参数,例如采样(默认为 44khz)

请参阅https://www.ibm.com/watson/developercloud/text-to-speech/api/v1/#synthesize_audio 了解诸如此类的选项

(...)
audio/l16;rate=rate 
(You can optionally specify endianness=big-endian 
or endianness=little-endian; the default is little endian.) 
(...)

但我看不到在红色节点中设置这些选项的方法

【问题讨论】:

    标签: text-to-speech ibm-watson node-red


    【解决方案1】:

    在Node-red中,没有选项,因为你需要在你的cURL中添加。

    如您所见,您可以使用Acceptaccept查询参数头来指定音频格式。

    例如:

    curl -X POST -u "{username}":"{password}"
    --header "Content-Type: application/json"
    --header "Accept: audio/l16;endianness=big-endian"
    --data "{\"text\":\"Hello world\"}"
    --output hello_world.wav
    "https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_AllisonVoice"
    

    【讨论】:

      【解决方案2】:

      请将此作为节点的 github 存储库上的改进请求,我们可以在那里继续讨论。没有承诺,但如果做得对,我愿意接受拉取请求。

      【讨论】:

      • 谢谢。我注意到回购中已经有部分实现了。我将等待它完成。我也在学习,也许我也可以帮忙。
      猜你喜欢
      • 1970-01-01
      • 2012-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-28
      • 2022-01-01
      • 1970-01-01
      相关资源
      最近更新 更多