alexa - 在 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”,
解决方案
您可以尝试使用此 \" 转义韵律标记属性中的双引号吗
"<speak><prosody pitch=\"+50%\">higher pitch</prosody></speak>"
或使用单引号
const speechOutput = '<speak><prosody pitch="+50%">higher pitch</prosody></speak>';
return handlerInput.responseBuilder
.speak(speechOutput)
.getResponse();
推荐阅读
- string - ShellScript 解析 sting 变量以通知发送
- java - Pivotal GemFire 9.3.0:GemFire 集群中的 Spring Data GemFire XML 配置
- parse-server - 在解析服务器日志中查看失败登录尝试的源 IP 地址
- javascript - 点击 Puppeteer 后检测 POST 响应到达
- c# - 反射方法调用对象与目标类型不匹配
- angular - IFrame 有时无法在 IE11 中运行
- javascript - 伊斯坦布尔纽约市包括测试文件
- c# - 在 Windows 4 月更新后,我的应用程序停止提供静态文件
- algorithm - 为什么循环中的会合点与链表的起点步数相同?
- python - 增加python递归限制后,程序似乎崩溃了。为什么?