在单一的自定义插槽中使用数字和短语,以便于alexa的使用。

问题描述 投票:0回答:1

有没有办法创建一个包含短语和数字的自定义插槽类型。类似的东西。

{
                "name": "mycustomslot",
                "values": [
                    {
                        "name": {
                            "value": "eating",
                            "synonyms": [
                                "eat something",
                                "are you eating",
                                "eat"
                            ]
                        }
                    },
                    {
                        "name": {
                            "value": "drinking",
                            "synonyms": [
                                "drink something",
                                "drinking",
                                "drink",
                            ]
                        }
                    }
                    {
                        "name": {
                            "value": AMAZON.NUMBER,
                            "synonyms": []
                            }
                        }
                    }
                ]
            },

所以,我可以从 "吃东西","你在吃什么 "等语句中得到 "吃 "的字样 So, I can get "eating" from utterances "eat something", "are you eating" etc. 还有一个数字,从一个槽型中说出一个数字 and a number on uttering a number from a single slot type.

alexa alexa-skills-kit alexa-skill alexa-voice-service alexa-slot
1个回答
0
投票

你可以使用这种类型。AMAZON.SearchQuery

该类型可以获得用户所说的所有短语。

语句。我吃了 {查询} (type of "query" is AMAZON.SearchQuery)

讲话。我吃 9盘肉

=> 值处理程序将收到这样的内容。{ name: "query", value: "9盘肉"}

© www.soinside.com 2019 - 2024. All rights reserved.