DialogFlow与Actions on Google集成报Empty speech response错误求助
Problem Context
You've integrated DialogFlow with Actions on Google, setting up intents, linking services, and configuring explicit/implicit invocations. However, when testing in the Actions Simulator, you keep hitting the error:
"Failed to parse Dialogflow response into AppResponse, exception thrown with message: Empty speech response"
Even though theinputTypeis set to "KEYBOARD".
You’ve already tried troubleshooting steps like:
- Enabling "Response from this tab will be sent to the Google Assistant integration" (and are unsure if this needs to be set per intent)
- Disabling secondary German language intents
- Turning off the Fulfillment Webhook (which supports both v1 and v2 APIs)
Notably, the bot works perfectly in DialogFlow’s "Try it now" panel and Web Demo, and debug logs show a critical clue:
"API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: ": Cannot find field."
You also clarified a common pitfall you encountered: the "Query pattern is missing for custom intent" error means you need to double-click words in the "User says" section to mark them as query parameters—this is a mandatory step for Actions on Google.
Troubleshooting & Fix Ideas
Here are actionable steps to resolve the "Empty speech response" error:
Enable Google Assistant Responses for Every Intent
That "Response from this tab will be sent..." setting does need to be enabled per intent, and you must add actual response content in the Google Assistant tab of each intent. DialogFlow’s default "Responses" tab content isn’t reliably picked up by Actions on Google—even a simple text reply in the Assistant-specific section ensures the simulator receives a valid speech payload.Fix Webhook Response Format (if re-enabling Webhook)
The debug log’s v2 parsing error points to invalid JSON structure. For v2, ensure your webhook returns afulfillmentMessagesarray with items explicitly targeted to the Actions platform. Example valid structure:{ "fulfillmentMessages": [ { "platform": "ACTIONS_ON_GOOGLE", "text": { "text": ["Your clear response here"] } } ] }Avoid deprecated v1 fields like
speech, and cross-check against the official Actions on Google v2 schema to ensure no required fields are missing.Audit Intent Trigger & Parameter Setup
Even though you fixed the query pattern issue, double-check that all intents used by Actions have:- Properly annotated query parameters (double-clicked words in "User says")
- No conflicting intent priorities that might trigger a fallback intent with no Assistant response
- Clear training phrases that align with how users will invoke the intent in the simulator
Inspect Detailed Error Logs
Head to the Actions Console’s Logs section (under "Test" or "Deploy") to pull full request/response payloads. This will show exactly which field the parser is missing, making it easy to pinpoint JSON formatting mistakes in your webhook or intent responses.Test with Explicit Invocation
Try triggering your intent with a direct command like:"Talk to [your app name] about [intent trigger phrase]"
Implicit invocations can fail due to context or trigger word ambiguity, so explicit calls help rule out invocation-related issues.Re-sync Your Integration
Occasionally, configuration sync between DialogFlow and Actions on Google gets stuck. Try:- Re-linking your DialogFlow project in the Actions Console
- Redeploying your Actions configuration
- Clearing the simulator’s session data before retesting
内容的提问来源于stack exchange,提问作者electrobabe

