2017-08-09 78 views
2

我已经为回声点构建了几种技巧。现在,我正在尝试为echo显示创建技巧。我已经通过几个文件了:回声显示的构建技巧

但是,我没有得到放在哪里directives以及如何使用lambda的一样。没有文档告诉我们如何处理lambda函数,要输入slotsutterances。任何人都可以告诉我如何创建一个基本的回声显示技能来播放视频。

这里是我从文档得到了一个样本指令:

{ 
"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

我已经建立了几个技能回声演出。以下是一个示例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" 
        } 
       } 
      } 
     ] 
    } 
}