错误“空语音响应”; [英] Error "Empty speech response"

查看:67
本文介绍了错误“空语音响应”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图连接 DialogFlow Google上的操作,所以我创建了一些意图,连接了服务,添加了显式和隐式调用等,但是当我尝试使用漫游器时在模拟器中



这是完整的调试输出:

  {
agentToAssistantDebug:{
agentToAssistantJson:{
message:未能将Dialogflow响应解析为AppResponse,抛出异常消息:空语音响应,
apiResponse:{
id: c12e1389-e887-49d4-b399-a332188ca946,
时间戳: 2018-01-27T03:55:30.931Z,
lang: zh-CN,
结果:{},
状态:{
代码:200,
errorType:成功
},
sessionId: 1517025330705
}
}
},
assistantToAgentDebug:{
assistantToAgentJson:{
user: {
userId: USER_ID,
locale: en-US,
lastSeen: 2018-01-27T03:55:03Z
},
对话:{
conversationId: 1517025330705,
type: NEW
},
inputs:[
{
intent: actions.intent.MAIN,
rawInputs:[
{
inputType:键盘,
query:与行家猫咪云母(Mica)交谈
}
]
}
],
表面:{
功能:[
{
name: actions.capability.MEDIA_RESPONSE_AUDIO
},
{
name: actions.capability.WEB_BROWSER
},
{
name: actions.capability.AUDIO_OUTPUT
},
{
name: actions.capability.SCREEN_OUTPUT
}
]
},
isInSandbox:true,
availableSurfaces:[
{
capabilities:[
{
名称: actions.capability.AUDIO_OUTPUT
},
{
name: actions.capability.SCREEN_OUTPUT
}
]
}
]
},
curlCommand: curl -v'https://api.api.ai/api/integrations/google?token=TOKEN'-H'内容类型:application / json; charset = UTF-8'-H'Google-Actions-API-Version:2'-H'授权:AUTH_TOKEN'-A'Mozilla / 5.0(compatible; Google-Cloud-Functions / 2.1; + http://www.google.com/bot.html)'-X POST -d'{\ user\:{\ userId\:\ USER_ID\,\ locale\:\ zh-CN\,\ lastSeen\:\ 2018-01-27T03:55:03Z\},\对话\:{ \ conversationId\:\ 1517025330705\,\ type\:\ NEW\},\ inputs\:[{\ intent\ :\ actions.intent.MAIN\,\ rawInputs\:[{\ inputType\:\ KEYBOARD\,\ query\:\与时髦的猫咪云母(Mica)对话}]}],] surface\:{\ capabilities\:[{\ name\:\ actions.capability。 MEDIA_RESPONSE_AUDIO\},{\ name\:\ actions.capability.WEB_BROWSER\},{\ name\:\ actions.capability.AUDIO_OUTPUT\}, {\ name\:\ actions.capability.SCREEN_OUTPUT\}]},\ isInSandbox\:true,\ availableSurfaces\:[{\capabilities\ :[{{\ name\:\ actions.capability.AUDIO_OUTPUT\},{\ name\:\ actions.capability.SCREEN_OUTPUT\}]}}]}}} '
},
sharedDebugInfo:[
{
name: ResponseValidation,
subDebugEntry:[
{
debugInfo: API版本2 :无法解析带有'INVALID_ARGUMENT'错误的JSON响应字符串:\:找不到字段。\。,
name: UnparseableJsonResponse
}
]
}
]
}

debugInfo听起来像是内部的问题:


API版本2:无法解析
'INVALID_ARGUMENT'错误的JSON响应字符串:\:找不到字段。 \。


以下是欢迎意图的屏幕截图:



ps。
我花了很多年才能弄清,


缺少自定义意图的查询模式


意味着-所以我只在这里记录它:在Dialog Flow-意图-用户说中,您必须在文本输入字段中的单词上双击您想将其设置为查询参数-这似乎是Google Actions所必需的。

解决方案

Google Actions支持我可以解决此问题:



我需要添加文本作为默认响应,以用于显式调用。


I tried to connect DialogFlow and Actions on Google, so I created some intents, connected the services, added explicit and implicit invocations etc, but when I try the bot in the simulator https://console.actions.google.com/project/[projectId]/simulator/ it always gives me the error:

"Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response"

even tough inputType was "KEYBOARD".

What I tried so far:

Unfortunately the docs don't say anything about this error. Any ideas?

Here a screenshot of the error on the Actions integration:

This is the full debug output:

{
  "agentToAssistantDebug": {
    "agentToAssistantJson": {
      "message": "Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response",
      "apiResponse": {
        "id": "c12e1389-e887-49d4-b399-a332188ca946",
        "timestamp": "2018-01-27T03:55:30.931Z",
        "lang": "en-us",
        "result": {},
        "status": {
          "code": 200,
          "errorType": "success"
        },
        "sessionId": "1517025330705"
      }
    }
  },
  "assistantToAgentDebug": {
    "assistantToAgentJson": {
      "user": {
        "userId": "USER_ID",
        "locale": "en-US",
        "lastSeen": "2018-01-27T03:55:03Z"
      },
      "conversation": {
        "conversationId": "1517025330705",
        "type": "NEW"
      },
      "inputs": [
        {
          "intent": "actions.intent.MAIN",
          "rawInputs": [
            {
              "inputType": "KEYBOARD",
              "query": "Talk to Mica, the Hipster Cat Bot"
            }
          ]
        }
      ],
      "surface": {
        "capabilities": [
          {
            "name": "actions.capability.MEDIA_RESPONSE_AUDIO"
          },
          {
            "name": "actions.capability.WEB_BROWSER"
          },
          {
            "name": "actions.capability.AUDIO_OUTPUT"
          },
          {
            "name": "actions.capability.SCREEN_OUTPUT"
          }
        ]
      },
      "isInSandbox": true,
      "availableSurfaces": [
        {
          "capabilities": [
            {
              "name": "actions.capability.AUDIO_OUTPUT"
            },
            {
              "name": "actions.capability.SCREEN_OUTPUT"
            }
          ]
        }
      ]
    },
    "curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=TOKEN' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: AUTH_TOKEN'  -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"USER_ID\",\"locale\":\"en-US\",\"lastSeen\":\"2018-01-27T03:55:03Z\"},\"conversation\":{\"conversationId\":\"1517025330705\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to Mica, the Hipster Cat Bot\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.MEDIA_RESPONSE_AUDIO\"},{\"name\":\"actions.capability.WEB_BROWSER\"},{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"
  },
  "sharedDebugInfo": [
    {
      "name": "ResponseValidation",
      "subDebugEntry": [
        {
          "debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\".",
          "name": "UnparseableJsonResponse"
        }
      ]
    }
  ]
}

Also "debugInfo" sounds like an internal problem:

"API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\"."

Here a screenshot of the welcome intent:

ps. It took me AGES to figure out, what

"Query pattern is missing for custom intent"

means - so I just document it here: In Dialog Flow - Intent - "User says" you have to DOUBLE CLICK on a word in the text input field when you want to set it as query parameter - which seems to be required for Actions on Google.

解决方案

The Actions on Google support helped me fix this problem:

I needed to add a text as Default Response to the intent used for Explicit Invocation.

这篇关于错误“空语音响应”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆