简体   繁体   English

在对话节点 alexa-sdk 期间更改 Card

[英]Changing Card during the dialog node alexa-sdk

I have searched the web already for an answer but I couldn't find one.我已经在网上搜索了答案,但找不到。 So basically imagine the following alexa-dialog:所以基本上想象下面的alexa-dialog:

'Alexa, start SKILL' 'Alexa,开始技能'

The Alexa device should show a simple card like Alexa 设备应该显示一个简单的卡片,如

'Hey USER. '嘿用户。 Nice to hear You.'很高兴听到你的音讯。'

, ask the USER what he wants to do next and be ready for an answer after that. ,询问用户他接下来想做什么,然后准备好回答。

// To do that, I am using the following line of code: 

this.emit('askWithCard', speechOutput, speechOutput, SKILLNAME, 'Hey USER...');

When Alexa is listening again, imagine the user saying something like当 Alexa 再次聆听时,想象用户说类似的话

'Do I have new messages?' “我有新消息吗?”

Alexa should then update the last card with something like然后Alexa应该用类似的东西更新最后一张卡片

'You have received 2 new messages of Tom.' “您收到了 2 条汤姆的新消息。”

and ask the USER for input again.并再次询问用户输入。

I have tried to just use the code mentioned above, but Alexa just does not update the card, so that even if I emit a new 'askWithCard' or 'tellWithCard', there still is the first 'Hey USER.我试图只使用上面提到的代码,但 Alexa 只是不更新​​卡,因此即使我发出新的“askWithCard”或“tellWithCard”,仍然是第一个“嘿用户”。 Nice to hear you'-card shown.很高兴听到你的声音 - 显示卡片。

Is there any possibility to update a card?有没有可能更新卡?

So it seems like it only appears in the developer console.所以它似乎只出现在开发者控制台中。 If I start the skill on my Alexa App on the phone it works just as expected.如果我在手机上的 Alexa 应用程序上启动该技能,它会按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM