【问题标题】:Intent immediately defaults to FallbackIntent, even with incredibly specific utteranceIntent 立即默认为 FallbackIntent,即使是非常具体的话语
【发布时间】:2019-01-16 05:09:42
【问题描述】:

the utterance
the slot being used

the testing screen

我的 lambda 函数的意图:

var phoneNumber;    
"getPhoneNumberIntent": function() {
    phoneNumber = this.event.request.intent.slots.phoneNumber.value;
    if (getLength(phoneNumber) === 10) {
        this.response.speak('I heard <say-as interpret-as="telephone"> ' + phoneNumber + '</say-as>. Is this the correct number?').listen();
        this.emit(':responseReady');
    } else {
        console.log(phoneNumber);
        this.response.speak('That is not a valid phone number. Please try again.').listen();

    }
},

当我输入令人难以置信的特定话语时,输出 JSON 中唯一的内容是 null。在输入中,甚至没有调用正确的意图。我在网站上没有看到类似我的问题,我看了高低。感谢您提供任何帮助或反馈。

【问题讨论】:

  • 插槽电话号码对应的意图名称是什么,并且是在您的代码库中被列为最后一个意图处理程序的后备意图处理程序。应该是因为它始终为真,因此您尝试命中的处理程序应在回退之前报告为真。
  • 最后,在测试控制台中输入数字一、一、一、一、一、一、一、一、一、一不是 1111111111 它不会将整数解释为口语数字。跨度>

标签: node.js aws-lambda alexa alexa-skills-kit alexa-slot


【解决方案1】:

使用预定义的AMAZON.NUMBER 作为phoneNumber 的槽类型。

在 Alexa 测试模拟器中测试数字时,将它们表示为单词

例如:电话号码是九八七六五四三二一 零

缩写使用句号“.”

例如:代码是 a.w.e.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-05-13
    • 2019-03-29
    • 1970-01-01
    • 1970-01-01
    • 2012-02-24
    • 2013-01-29
    • 2013-10-20
    相关资源
    最近更新 更多