亚马逊 Alexa - 如何创建通用插槽

Amazon Alexa - How to create Generic Slot

如何为 Alexa 技能创建通用插槽?这样我就可以创建自己的 Todo 应用程序,它会识别自由格式的文本。

现在可以获取话语的原始 "transcript" 或其中的一部分。

曾经有一个字面类型内置槽,给你一些东西,但亚马逊停止支持它。

您是否对插槽列表中包含一些常见示例的插槽进行过任何测试?我问是因为我有一个小的自定义插槽,有 10 个选项,并且能够识别非常广泛的内容(不在列表中的项目)。

Alexa blog announced a List Skill API。如前所述,新技能不再支持文字槽类型

如果您创建一个包含多个值的自定义插槽 - 取决于您对单个词或 2 个以上词的预期响应值 - Alexa 也会捕获不在列表中的口头词并将它们传递给您的技能。这些词的转录是尽力而为,可能并不完美。亚马逊停止了文字插槽类型,因为语音转文本的结果不够好。

您可以 sign up for a limited beta 列表技能 API,也许这会解决您的问题。

这篇文章"Why a Custom Slot is the Literal Solution"

Using custom slot types for grammar as described above typically fulfills this desire and enables you to improve accuracy through NLP training. If you still just want everything, you can create a custom slot called something like “CatchAll” and a corresponding intent and utterance: CatchAllIntent {CatchAll}. If you use the same training data that you would have used for LITERAL, you’ll get the same results. People typically find that adding a little more scenario specific training data improves accuracy.

If you’re still not getting the results, trying setting the CatchAll values to around twenty 2 to 8 word random phrases (from a random word generator – be really random). When the user says something that matches your other utterances, those intents will still be sent. When it doesn’t match any of those, it will fall to the CatchAll slot. If you go this route, you’re going to lose accuracy because you’re not taking full advantage of Alexa’s NLP so you’ll need to test heavily.

顺便说一句,字面广告位已于 2017 年 1 月回归,但不推荐这样做。

Based on developer feedback we will not remove the LITERAL slot type and you can continue to submit skills that include its functionality.

这是link到LITERAL Slot Type Reference