Alexa 技能套件 (ASK) 和话语 [英] Alexa Skills Kit (ASK) and Utterances

查看:24
本文介绍了Alexa 技能套件 (ASK) 和话语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Alexa 开发一个简单的自定义技能.我已经启动并运行它,并在 AWS Lambda 上托管处理程序.它工作正常,除了...

I am developing a simple, custom skill for Alexa. I have it up and running, and hosting the handler on AWS Lambda. It's working fine except...

在测试 UI 中,如果我输入有效的话语,例如帮助、取消、游泳、跑步(两个自定义话语),则一切正常;但是,如果我输入无意义的话语,例如 dsfhfdsjhf,Alexa 服务始终会将无意义的内容映射到意图架构中的第一个有效意图.

In the test UI, if I enter a valid utterance, e.g., help, cancel, swim, run (two custom utterances), everything works well; however, if I enter a nonsense utterance, e.g., dsfhfdsjhf, the Alexa service always maps the nonsense to the first valid intent in the intents schema.

在我的 lambda 代码中,我有一个处理未知意图的处理程序;然而,意图永远是未知的.这是测试界面的神器吗?还有什么事吗?

In my lambda code, I have a handler for handling unknown intents; however, the intent is never unknown. Is this an artifact of the test interface? Something else happening?

谢谢,约翰

推荐答案

基于在您的方法中包含未处理的意图,听起来您正在使用 适用于 Node.js 的 Alexa Skills Kit SDK.您的问题不是测试界面的工件.是的,正在发生其他事情.

Based on the inclusion of an unhandled intent in your approach, it sounds like you are using the Alexa Skills Kit SDK for Node.js. Your issue is not an artifact of the test interface. Yes, something else is happening.

虽然亚马逊尚未承认,但很多人都承认这是 SDK 中的一个问题.请参阅这个未决问题.就个人经验来说,上面的建议,不管是真话还是胡言乱语,未处理的意图永远不会被调用.在解决此问题之前,我的建议是构建一个处理程序,它是您技能的高级提示,并为用户重申他们拥有的有效选项.将其定位为包罗万象.希望我们能看到这个 SDK 得到更好的维护.

While not yet acknowledged by amazon, this is a recognized issue in the SDK by a number of folks. See this open issue. Speaking from personal experience to the suggestion above, it doesn't matter if you use real words or gibberish, the unhandled intent is never called. Until this is fixed, my suggestion would be to build a handler that is a high level prompt for your skill, and reiterates for the user the valid options they have. Position it to be the catch-all. Hopefully we will see better maintenance of this SDK moving forward.

这篇关于Alexa 技能套件 (ASK) 和话语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆