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

查看:131
本文介绍了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...

在测试用户界面中,如果我输入有效的语音,例如帮助,取消,游泳,跑步(两个自定义语音),则一切效果很好;但是,如果我输入废话,例如dsfhfdsjhf,Alexa服务将始终将废话映射到intents模式中的第一个有效意图。

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?

谢谢,
John

Thanks, John

推荐答案

基于您的方法中包含未处理的意图,听起来您正在使用用于Node.js的Alexa技能套件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天全站免登陆