【问题标题】:MediaObject in Actions on Google throws an error while using test simulator使用测试模拟器时,Google Actions 中的 MediaObject 引发错误
【发布时间】:2019-03-16 08:47:28
【问题描述】:

我收到类似“抱歉,出了点问题。准备好后,再试一次。”的回复。

当我将表面更改为扬声器模式或智能显示模式时会发生这种情况。 在电话模式下测试时不会出现。

以下是我得到的响应 JSON:

{
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "<speak><prosody pitch=\"-2.139st\">I am now loading Song#2 which is: <break time='500ms'/><emphasis level=\"strong\">Song_Name</emphasis></prosody></speak>"
            }
          },
          {
            "mediaResponse": {
              "mediaType": "AUDIO",
              "mediaObjects": [
                {
                  "contentUrl": "song_url",
                  "description": "song_desc",
                  "name": "song_name"
                }
              ]
            }
          }
        ],
        "suggestions": [
          {
            "title": "Cast Vote"
          },
          {
            "title": "No"
          }
        ]
      },
      "userStorage": "{\"data\":{\"count\":2,\"countExit\":0}}"
    }
  }
}

调试部分在视觉响应中显示以下内容:

{
  "visualResponse": {
    "visualElementsList": [
      {
        "simulatorMediaResponse": {
          "mediaResponse": {
            "mediaType": 1,
            "mediaObjectsList": [
              {
                "name": "song_name",
                "description": "song_desc",
                "contentUrl": "song_url"
              }
            ],
            "startOffsetMs": 0
          },
          "mediaSessionId": "-1057369484946957721"
        }
      },
      {
        "displayText": {
          "content": "I am now loading Song#2 which is: song_name"
        }
      },
      {
        "displayText": {
          "content": "Sorry, something went wrong. When you're ready, give it another try."
        }
      }
    ]
  }
}

我想知道为什么这只发生在测试模拟器的扬声器和智能显示器上?

【问题讨论】:

    标签: actions-on-google google-home dialogflow-es-fulfillment


    【解决方案1】:

    嗯,我的解决方案花了我 3999 卢比。没有问题,只是模拟器问题。此问题不会在设备上持续存在。该操作在 Google Home Mini 上运行没有任何问题。

    【讨论】:

      猜你喜欢
      • 2018-11-25
      • 2015-01-30
      • 2020-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-19
      相关资源
      最近更新 更多