我已经为echo dot构建了几项技能。现在,我正在努力为echo show建立一项技能。我已经阅读了几个文档:
但是,我没有把directives
放在哪里以及如何使用lambda
。没有文档告诉我们如何处理lambda函数,放在slots
和utterances
中的内容。任何人都可以告诉我如何创建一个基础回声显示技能来播放视频。
以下是我从文档中获得的示例指令:
{
"version": "1.0",
"sessionAttributes": null,
"response": {
"outputSpeech": null,
"card": null,
"directives": [
{
"type": "VideoApp.Launch",
"videoItem":
{
"source": "https://www.example.com/video/sample-video-1.mp4",
"metadata": {
"title": "Title for Sample Video",
"subtitle": "Secondary Title for Sample Video"
}
}
}
],
"reprompt": null
}
}
答案 0 :(得分:0)
我为echo show建立了一些技巧。这是一个有效的json响应示例。有一点需要注意,这一点非常重要 - 请勿包含shouldEndSession属性:)
{
"version": "1.1",
"sessionAttributes": {},
"response": {
"reprompt": {
"outputSpeech": {
"type": "PlainText",
"text": "Hello? Are you still there?"
}
},
"outputSpeech": null,
"card": null,
"directives": [
{
"type": "VideoApp.Launch",
"videoItem": {
"source": "[url to video.mp4]",
"metadata": {
"title": "Title meta",
"subtitle": "Secondary Title for Sample Video"
}
}
}
]
}
}