【问题标题】:Playing short wav files in Google Home在 Google Home 中播放短 wav 文件
【发布时间】:2017-04-25 17:42:04
【问题描述】:

我想播放一段简短的声音以获得更有趣的输出。如果我正确理解文档,应该可以在 api.ai 中回复类似 SSML 的内容:

<speak>Okay here we go: <audio src="http://example.com/boing.wav">boing</audio>. You are welcome!</speak>

仅供参考 SSML 表示Speech Synthesis Markup Language

web simulator 不播放此声音,而是所有标签似乎都被删除了。是还不支持还是我做错了什么?

【问题讨论】:

  • 刚来这里是为了问同样的问题。如果有的话,请在 Skype 上加我:'dreamache'
  • @GarySimon 我得到了一些答案。我们需要使用 https!

标签: dialogflow-es ssml actions-on-google google-home


【解决方案1】:

src URL 也必须是 https URL(Google Cloud Storage 可以在 https URL 上托管您的音频文件)。

https://developers.google.com/actions/reference/ssml

【讨论】:

    【解决方案2】:

    没有看到你的来源,有几个可能的原因:

    我的 node.js 服务器具有以下功能(当然,URL 除外):

      var msg = `
      <speak>
        Tone one
        <audio src="https://examaple.com/wav/Dtmf-1.wav"></audio>
        Tone two
        <audio src="https://example.com/wav16/Dtmf-2.wav"></audio>
        Foghorn
        <audio src="https://example.com/mp3/foghorn.mp3"></audio>
        Done
      </speak>
      `;
    
      var reply = {
        speech: msg,
        data:{
          google:{
            "expect_user_response": true,
            "is_ssml": true
          }
        }
      };
    
      res.send( reply );

    【讨论】:

      【解决方案3】:

      这就是我的代码。我的意图是在文本响应字段中。

       <speak> One second <break time="3s"/> OK, I have used the best quantum processing algorithms known to computer science! Your silly name is $color $number. I hope you like it. <audio src="https://www.partnersinrhyme.com/files/sounds1/WAV/sports/baseball/Ball_Hit_Cheer.wav"></audio> </speak>
      

      在 api(dot)ai 字段的测试区不起作用,但是当我打开集成并在谷歌模拟器上尝试时,它确实起作用。这里:https://developers.google.com/actions/tools/web-simulator

      【讨论】:

      • 感谢您花时间回答。 https 是我错过的细节。
      猜你喜欢
      • 2012-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-15
      • 2010-09-19
      • 2013-03-17
      • 2013-07-13
      相关资源
      最近更新 更多