媒体播放器正在播放时会困惑以捕获自定义下一个意图

时间:2018-11-15 03:59:24

标签: node.js dialogflow actions-on-google

使用Media Player使MediaResponse变得简单。

Google自动处理:playpausestopresume

由于Google还不支持next函数,因此我创建了custom Next Intent来处理next函数。

talk to Dr. Media然后go之后,我有2个案例使我感到困惑:

MediaResponse正确显示,尚未播放(尚未点击“播放”按钮)。

案例1 -然后我说next(或next song),它与我的自定义意图与我定义的短语匹配。并且Next function可以。

案例2 -我点击“播放”按钮以播放音频,然后我说next(或next song),它与我定义的词组不匹配(通常会说Okay却什么也没有发生),因此Next function不合适。 (如下图所示)

screenshot of .csv pulled from github enter image description here

在第2种情况下,播放Media Player时如何捕捉我的短语nextnext songplay next ...? (换句话说,这些短语无法触发我的自定义意图

请帮助我,谢谢

p / s:发生在手机上

actions_intent_NEXT.json

    {
  "id": "01055a59-26a0-4f39-a770-6bc5404482d9",
  "name": "actions_intent_NEXT",
  "auto": true,
  "contexts": [
    "actions_capability_screen_output",
    "actions_capability_media_response_audio"
  ],
  "responses": [
    {
      "resetContexts": false,
      "affectedContexts": [
        {
          "name": "actions_capability_screen_output",
          "parameters": {},
          "lifespan": 5
        },
        {
          "name": "actions_capability_media_response_audio",
          "parameters": {},
          "lifespan": 5
        }
      ],
      "parameters": [
        {
          "id": "2ce8514c-a346-4251-9a35-cab32d2c9d7c",
          "required": false,
          "dataType": "@nextPlay",
          "name": "nextPlay",
          "value": "$nextPlay",
          "isList": false
        }
      ],
      "messages": [
        {
          "type": 0,
          "speech": []
        }
      ],
      "defaultResponsePlatforms": {},
      "speech": []
    }
  ],
  "priority": 500000,
  "cortanaCommand": {
    "navigateOrService": "NAVIGATE",
    "target": ""
  },
  "webhookUsed": true,
  "webhookForSlotFilling": false,
  "lastUpdate": 1542252675,
  "fallbackIntent": false,
  "events": [
    {
      "name": "actions_intent_NEXT"
    }
  ],
  "userSays": [
    {
      "id": "e28a4087-2bf9-494d-9790-c7347f870ee4",
      "data": [
        {
          "text": "next song",
          "alias": "nextPlay",
          "meta": "@nextPlay",
          "userDefined": true
        }
      ],
      "isTemplate": false,
      "count": 0,
      "updated": 1542249008,
      "isAuto": false
    },
    {
      "id": "7a8cf2a2-d131-490d-977d-1212f4642f52",
      "data": [
        {
          "text": "next",
          "alias": "nextPlay",
          "meta": "@nextPlay",
          "userDefined": true
        }
      ],
      "isTemplate": false,
      "count": 0,
      "updated": 1542248700,
      "isAuto": false
    }
  ],
  "followUpIntents": [],
  "liveAgentHandoff": false,
  "endInteraction": false,
  "templates": []
   }

0 个答案:

没有答案