【问题标题】:Problems in adjusting rate/pitch in Alexa SSML在 Alexa SSML 中调整速率/音高的问题
【发布时间】:2018-12-13 06:59:31
【问题描述】:

我试图通过以下方式调整 Alexa 的说话速度和音调:

outputSpeech: {
            type: "SSML",
            ssml: "<speak><prosody pitch="+50%">higher pitch</prosody></speak>"
},

执行结果成功,但是我注意到"ssml": "&lt;speak&gt;&lt;prosody pitch=NaN" 当我去模拟器测试时,Alexa回复了There was a problem with the requested skill's response

所以我尝试了几件事:

ssml: "<speak><prosody rate="150%">faster pace</prosody></speak>"

执行结果失败: "SyntaxError: Unexpected number",

【问题讨论】:

    标签: alexa ssml


    【解决方案1】:

    您可以尝试使用此 \"

    转义 prosody 标记属性中的双引号吗
    "<speak><prosody pitch=\"+50%\">higher pitch</prosody></speak>"
    

    或使用单引号

      const speechOutput = '<speak><prosody pitch="+50%">higher pitch</prosody></speak>';
          return handlerInput.responseBuilder
          .speak(speechOutput)
          .getResponse();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-19
      • 1970-01-01
      • 1970-01-01
      • 2019-01-03
      • 2016-10-18
      • 1970-01-01
      • 2016-08-23
      • 2016-12-31
      相关资源
      最近更新 更多