【问题标题】:SSML Confusion - Alexa LambdaSSML 混淆 - Alexa Lambda
【发布时间】:2019-05-09 08:22:50
【问题描述】:

我是构建 Alexa 技能的新手。

我已经成功构建并发送了一项技能,但现在想改进它。

我主要想改变 Alexa 说出我的代码的方式...我不明白如何在我的 Node.js 代码中实现 SSML...

这是我的代码的一部分...

"AMAZON.CancelIntent": function () {
    this.response.speak("Thank you for using The Bible Geek. If you enjoyed your learning experience, why not leave us a 5 star review and let us know if there are topics that you would like The Bible Geek to cover. Goodbye")
    this.emit(':responseReady');   },

我真的很希望能够实现一个暂停,例如<break time="3s"/>

任何帮助表示赞赏。提前致谢

【问题讨论】:

    标签: aws-lambda alexa-skills-kit alexa-skill alexa-voice-service ssml


    【解决方案1】:

    在您的情况下,使用 SSML 标签 非常简单,您只需在需要暂停 3 秒的响应中添加此中断时间标签 <break time="3s"/>

    例如,在您上面的代码 sn-p 中,您只需要这样做:

    (注意:使用模板字符串运算符(``)而不是单引号('')或双引号(“”))

     this.response.speak(`There is a three second pause here <break time="3s"/> then the speech continues.`)
     this.emit(':responseReady');

    【讨论】:

    • 我试过了,但由于某种原因它不允许我在代码中使用标签!?调用解析错误???
    • 使用模板字符串运算符 (``) 而不是单引号 ('') 或双引号 (""),然后重试。
    • 或者您能否提供错误的详细信息..编辑您的问题并添加错误详细信息..
    猜你喜欢
    • 2017-10-06
    • 2016-12-31
    • 2017-06-06
    • 1970-01-01
    • 1970-01-01
    • 2013-03-26
    • 2016-09-28
    • 2016-08-02
    • 2017-11-29
    相关资源
    最近更新 更多