Response from dialogflow does not come to Google Assistant - actions-on-google

Sometimes Google Assistant does not answer me even though I receive correct response from the fulfillment. That happens only when I use voice command, by using keyboard it always works fine.
What I receive instead of the response
It's just 'thinking'.
After using conv.close('You've punched-in into demo as Jack'); in DialogFlow history I can see following response:
{
"queryText": "Jack",
"fulfillmentMessages": [
{
"text": {
"text": [
"[{\"type\":0,\"speech\":\"\"}]"
]
}
}
],
"webhookPayload": {
"google": {
"userStorage": "{\"data\":{}}",
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "You've punched-in into demo as Jack"
}
}
]
},
"expectUserResponse": false
}
},
"outputContexts": [
...
],
"intent": {
"id": "96f93154-0ae4-4bb4-91c3-c1b796d7cda3",
"displayName": "punch-in"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}
Does any one experienced such issue?
Noticed on Galaxy S7, Android 6.0.1.
actions-on-google v.2.2.0

That mostly happens to me when the internet connection is not good. With voice, there is an extra layer of Voice to Text conversion. Same latency issue might be causing the issue in your case.

The google assistant team resolved the issues I created to them, and after that the issues is not reproduced.

Related

Google keeps flipping between custom voice and google default voice

We are using Google Action SDK in SSML to respond user in custom voice. But Google keeps flipping between custom voice and google default voice.
The switching between custom voice and google voice happens randomly. You are not able to consistently reproduce it. Below is an example of the response. The audio source url is the file location stored in Azure storage and it expires in a few mins after generated.
{
"expectUserResponse": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.TEXT"
}
],
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Hi! I can help you with so many things! Like getting you an auto quote or answering general insurance questions. So what can I do you for?",
"ssml": "<speak>\r\n <audio src=\"https://qa01storgapp01dcq.blob.core.windows.net/google-assistant-audio-permanent/LUISIntentsandGetQuoteEntities-9.mp3?sv=2019-07-07&spr=https&se=2020-08-18T19%3A30%3A28Z&sr=b&sp=r&sig=eszRZWEw6sc58xRyz1Y7PrnpP4gyxfDUm%2FGQn9QxElM%3D\">Hi! I can help you with so many things! Like getting you an auto quote or answering general insurance questions. So what can I do you for?</audio>\r\n</speak>",
"displayText": "Hi! I can help you with so many things! Like getting you an auto quote or answering general insurance questions. So what can I do you for?"
}
}
],
"suggestions": [
{
"title": "Get Quote"
},
{
"title": "Ask a Question"
}
]
}
}
}
],
"isInSandbox": false
}

CameraStream Actions on Google

I am trying to integrate camera to my smarthome with google assistant. I followed CameraStream in actions on google. i have synced my camera and tried execute and responding with an URL(cameraStreamAccessUrl).
Command: "show camera"
google home reply: "Sure, streaming camera" <-- but it is not streaming the video.
Command: "show camera on my phone"
google home reply: "Sorry, i don't know where to play the video. Please tell me the exact name of the screen"
My question is how can i stream it on my phone or on the app?
execution request google json:
{
"inputs": [
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"customData": {
"barValue": true,
"bazValue": "lambtwirl",
"fooValue": 74
},
"id": "id"
}
],
"execution": [
{
"command": "action.devices.commands.GetCameraStream",
"params": {
"StreamToChromecast": false,
"SupportedStreamProtocols": [
"hls"
]
}
}
]
}
]
}
}], "requestId": "requestId"
}
my json response:
{
"requestId": "requestId",
"payload": {
"commands": [
{
"ids": [
"requestId"
],
"status": "SUCCESS",
"states": {
"cameraStreamAccessUrl": "https://url.url"
}
}
]
}
}
If you have a Chromecast in your home, the Google Home will forward the video stream to the Chromecast. I don't know where the stream would go if you don't have a display.
Saying "on my phone" is not a valid target from a Google Home. To get it on your phone, you'd need to use the Assistant on your phone or the Google Home App.

Google Home dialogFlow V2 API mediaResponse not working

I decided to upgrade my Google Assistant action to use "dialogFlow V2 API" and my webhook returns an object like this
{
"fulfillmentText": "Testing",
"fulfillmentMessages": [
{
"text": {
"text": [
"fulfillmentMessages text attribute"
]
}
}
],
"payload": {
"google": {
"richResponse": {
"items": [
{
"mediaResponse": {
"mediaType": "AUDIO",
"mediaObjects": [
{
"name": "mediaResponse name",
"description": "mediaResponse description",
"largeImage": {
"url": "https://.../640x480.jpg"
},
"contentUrl": "https://.../20183832714.mp3"
}
]
},
"simpleResponse": {
"textToSpeech": "simpleResponse: testing",
"ssml": "simpleResponse: ssml",
"displayText": "simpleResponse displayText"
}
}
]
}
}
},
"source": "webhook-play-sample"
}
But I get an error message saying my action it is not available, is mediaResponse supported by V2?, should I format my object differently?, also, when I remove "mediaResponse" object works just fine and the assistant will speak the simpleResponse part.
This action was re-created this Mid March 2018 and I read about May deadline and that is why I decide to upgrade to V2, do you think I should go back to V1, I know I will have to delete it and re-created but that is fine. This is a link to the JSON object I see in the debug tab. Thanks once again
I set "API V2" in my action dialogFlow console, this is a screenshot of that setting
Here is an screenshoot of my action's integration -> Google Assistant
Thanks Allen, Yes I do have "expectUserResponse": false, I added the suggestion object you recommended but, unfortunately nothing changed, I am still getting this error
Simulator debug tag details
First of all - this is not a problem with Dialogflow V2. You also seem to be confusing the sunset of Actions on Google V1 with the release of Dialogflow V2 - they are two different creatures completely. If your project was using AoG V1, there would be a setting on the Actions integration screen, and thee isn't.
It is fine if you want to move to Dialogflow V2, but it isn't required. Media definitely works under Dialogflow V2.
The array of items must include a simpleResponse item first, before any of the other items in the RichResponse. (You also shouldn't include both ssml and textToSpeech - just one of them.) You also don't need the fulfillmentText and fulfillmentMessages components, since those are provided by the richResponse.
You also need to include suggestions chips unless you have set expectUserResponse to false. Somewhere in the simulator debug is probably a block that says
{
"name": "MalformedResponse",
"debugInfo": "expected_inputs[0].input_prompt.rich_initial_prompt: Suggestions must be provided if media_response is used..",
"subDebugEntryList": []
}
So something more like this should work:
{
"payload": {
"google": {
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "simpleResponse: testing",
"displayText": "simpleResponse displayText"
},
"mediaResponse": {
"mediaType": "AUDIO",
"mediaObjects": [
{
"name": "mediaResponse name",
"description": "mediaResponse description",
"largeImage": {
"url": "https://.../640x480.jpg"
},
"contentUrl": "https://.../20183832714.mp3"
}
]
}
}
]
"suggestions": [
{
"title": "This"
},
{
"title": "That"
}
]
}
}
},
"source": "webhook-play-sample"
}

Google action console simulator request and response tab not working when using custom action.json

I have the problem that the google home/assitant action console simulators response and request tab are not working. At least when I am using a custom action.json.
For me I am not sure if all have this problem or only some. That are using an custom action sdk. Or is it a problem only because something of my action.json is maybe not 100% correct configured.
here is the action.json:
{
"actions": [
{
"description": "Default Welcome Intent",
"name": "MAIN",
"fulfillment": {
"conversationName": "testApp"
},
"intent": {
"name": "actions.intent.MAIN",
"trigger": {
"queryPatterns": [
"open special manager",
"open s p m"
]
}
}
}
],
"types": [],
"conversations": {
"testApp": {
"name": "testApp",
"url": "https://572e66a2.ngrok.io/",
"fulfillmentApiVersion": 2,
"in_dialog_intents": [
{
"name": "actions.intent.NO_INPUT"
},
{
"name": "actions.intent.SIGN_IN"
}
]
}
}
here is a picture of the request:
As you can see it is only the dummy content in request tab anyway if the chat is working.
The response tab is completly empty. But the messages and voice is correctly working. Also on my google home.
Does anybody have an idea? I will add of course more debug informations if necessary. Can it be trouble with the response or request messages from my server?
But actually the messages, they are working...

Getting "Sorry, I didn't get any response." message when I tried Hand-off feature

When I tried Multi-surface conversations (Hand-off from Google Home to Android Google Assistant), I'm getting "Sorry, I didn't get any response."
I'm using Action SDK and locale is "ja".
Here is my response:
{
"conversationToken": "(token)",
"expectUserResponse": true,
"isInSandbox": true,
"expectedInputs": [
{
"possibleIntents": [
{
"intent": "actions.intent.NEW_SURFACE",
"inputValueData": {
"#type": "type.googleapis.com/google.actions.v2.NewSurfaceValueSpec",
"context": "Sure, I have some sample images for you.",
"notificationTitle": "Sample Images",
"capabilities": [
"actions.capability.SCREEN_OUTPUT"
]
}
}
],
"inputPrompt": {
"richInitialPrompt": {
"items": {
"simpleResponse": {
"textToSpeech": "PLACEHOLDER_FOR_NEW_SURFACE"
}
}
}
}
}
]
}
Does anyone know why?
Turns out that this is not a bug in a certain locale, but that askForNewSurface is currently supported for english locales only.
This is what I got from AoG support:
Hi Jan,
Thank you for your interest in Actions on Google.
askForNewSurface is indeed only available for English locales. We are in the process of changing the documentation to reflect those restrictions.
Sorry for the confusion.
We do not have any set det for the release of this feature in other locales.
Kind Regards,
Jean-Charles,
Actions on Google Support Team.
It seems to be available only in english but i find no clear statement about this on any documentation.
I tried the exact same code in english and in french, it works in english, not in french.