在 Alexa SSML 中调整 rate/pitch 的问题
Problems in adjusting rate/pitch in Alexa SSML
我试图通过以下方式调整 Alexa 的说话速度和音调:
outputSpeech: {
type: "SSML",
ssml: "<speak><prosody pitch="+50%">higher pitch</prosody></speak>"
},
执行结果成功,但是我注意到了"ssml": "<speak><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",
你能尝试使用这个 \"
转义 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();
我试图通过以下方式调整 Alexa 的说话速度和音调:
outputSpeech: {
type: "SSML",
ssml: "<speak><prosody pitch="+50%">higher pitch</prosody></speak>"
},
执行结果成功,但是我注意到了"ssml": "<speak><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",
你能尝试使用这个 \"
转义 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();