我正在开发一项技能,我希望用户能够通过告诉在调用时提供槽值来启动该技能
Alexa start [skill name] for the [slot value]
在 Alexa 模拟器中,当我将其作为文本输入时,我只得到 <audio response only>
来自模拟器。
当我分两步完成时,它确实有效:
我:Alexa start [skill name]
Alexa:For which election?
我:For the [slot value]
Alexa:Okay here we go...
我是否遗漏了一些设置才能使其正常工作?
这是代码:
var newSessionHandlers = {
NewSession: function() {
this.emit(
':ask',
'For which election?',
);
},
ChooseElection: function() {
this.emit(':tell', 'Here we go');
}
}
最佳答案
有一组受支持的短语可用于有意图地调用您的技能。其中大多数都有<connecting words>
在调用具有特定请求的技能时必须包含该内容。
在您的情况下,开始必须后跟和,然后是话语。
即,
Start <invocation name> and <some action>
请引用此page了解用于有意图地调用您的技能的受支持短语。
希望这有帮助。
关于javascript - Intent 的 Alexa 调用名称不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51799842/