Google assistant doesn't recognize "Some xxxxx" - actions-on-google

I have a Google Assistant recycling app in test whose introductory scene prompts a user for an item to be recycled. The app should tell the user how to dispose of the item. The introductory scene has 11 user intents. Nine of these process the input item to return a response specific to the item. #10 is a catchall if #1-9 fail to fire. It calls a webhook that looks up the input item in a JSON array and returns a result. #11 is a Help intent.
The nine item intents have between 11 and 51 training phrases each that should respond to prompts such as "What do you have" or "What it the item". The phrases include 10 variations along the lines "I have..." or "it's a ..." or "A ...". In testing some far, the input item works as intended with one exception: the "Some ..." input.
If "Some xxx" is input by keyboard or voice and the xxx in in a Type associated with one of the nine user intents, the input is processed correctly.
But if the xxx is not in those types associated with one of the nine user intents, the input is not always processed correctly. It should drop out to the webhook and in some cases it does. In other cases, Test Results shows that the input calls the third intent of nine (incorrect), and immediately returns to ask for another item without adding the prompt that should be added to the prompt queue when the third intent is entered, nor progressing to calling the webhook.
Some of these failed examples: "Some video" fails but "video" is handled correctly. "Some acid" fails but "It's acid" works. "Some audio" and "I have some audio" both work. The failure seems to be random by item and only if "Some" is the first word of the input.
Could this be mistaking "Some" for "Sum"?

Related

Google Action - Change timeout of "Free form text"

I need to implement an action that has to collected anything a user says.
So I use the "Free form text" as "Type" for the slot filling.
This implementation works, however when the user have a pause of 1 second (maybe less of 1 second), google assistant stop to record what user says.
Is it possibile to increment the default timeout of 1 second, for example to 3 or 4 seconds?
The platform does not have a way to customize the timeout for any sort of speech input.

Alexa Confirmation of Number

I ask the user for a number for a slot and then want to confirm the number. The numbers are seven digits(e.g., 5433975).
Alexa confirms by saying the number as a value rather than saying each digit.
I have tried '{acblNumber} right' for the confirmation and it does not work.
I hope someone has a solution.
You must send speech output as SSML type:
speechOutput = "<say-as interpret-as='digits'>5433975</say-as>"

google action conversation exit: not waiting for user response

I am trying to seek user feedback at the end of a google action session using actions sdk.
As per the Actions documentation (https://developers.google.com/actions/assistant/conversation-exits), I have set the cancel intent
"conversations" : {
...
"inDialogIntents": [
{
"name": "actions.intent.CANCEL"
},
...
and in my functions code I am calling a SimpleResponse as below:
app.intent('actions.intent.CANCEL', (conv, input) => {
conv.close(new SimpleResponse({
speech: 'Kindly rate between 1 and 5,
text: 'Rate between 1 and 5'
}));
});
When the user says goodbye, the above code gets called. The speech is heard and text displayed but the conversation immediately exits with an earcon.
The documentation mentions that the system will wait for 2 seconds before exiting but it seems to do so immediately. Is there a way to get this working? Thanks
It's not quite clear to me what you'd like to achieve. First of all, as long as you're using conv.close() method, you are ending the conversation. If you want to keep the mic open, you need to use conv.ask() method. But I'm not sure id you can use conv.ask() with actions.intent.CANCEL, because that event is there to get the user out, not to keep the conversation going. But I'm not %100 sure, you need to try it.
If what you're trying to achieve is something like this:
User: cancel
System: How would you rate our interaction?
User: Good.
earcon
Then, in my humble opinion, you probably shouldn't (and as I said you probably can't) do it. The docs clearly state that the purpose for custom exit behavior is:
to cleanup your fulfillment logic and respond to the user one last time.
Also, the docs doesn't say the system will wait for the user response for 2 second. It says the execution of the request (the time out for your fulfillment) is 2 seconds. Plus; if a user is canceling mid-conversation, chances are that the interaction was unsuccessful anyway. I'd rather create feedback dialog turns that are connected to the fallback intents and happy path(s).
Still, try to use conv.ask() instead and let me know if that works. (And please let me know by commenting.) Either case, though, I'd consider getting the feedback some other way.

Dialogflow, Google Assistant: Getting error "MalformedResponse 'final_response' must be set"

I have three intents, "Cold Exposure", "Poisoning" and "Frostbite". Each intent has suggestion chips to move to the next intent, i.e. the "Cold Exposure" shows a chip of "Poisoning" and "Poisoning" shows a suggestion chip of "Frostbite".
All are follow up intents of the Default Welcome Intent, so all have the "Default Welcome Intent- followup" input context.
My problem is, when I call Cold Exposure and then call Poisoning, there's no problem. However, when I call Cold Exposure and then Poisoning, and then Frostbite, I get an error "MalformedResponse 'final_response' must be set." . Im not able to call any three intents back to back. I really dont know why this is happening.Im using v2 API.
This is the only error I have in my program, so it would be great if this could be solved quick.This is a screenshot of my intents.
What is the lifespan of the "Default Welcome Intent- followup" output context in the Default Welcome Intent?
By default, when you create followup Intents, the output context lifespan set in the root Intent is 2. Each action decrements this count and the context disappears when the count reaches 0.
Try increasing the lifespan (in the grey circle next to the output context name) to something like 10 (or any other number you see fit) and remove it manually when needed in later intents (by setting it as output context with a lifespan of 0).
Florent.
I actually wouldn't have expected that the followup intents would work the way you're trying. They're all followups to the original intent, rather than to each other. So it could be that the lifespan of the original intent's Context has expired by the third one. In this case, it would revert to the Fallback Intent.
But the reason for the error message itself is that you're not sending back a reply. If you're using a fulfillment, it means it isn't sending a reply. If you're not, it could be that the "Frostbite" Intent doesn't have a reply set or that your Fallback Intent doesn't have a reply set.

AutoCompletion on UISearchBar

I am developing applcation with UISearchBar & TableView. On UISearchBar's text enter event I am reading char. & for entered text I am geeting results from database. But problem is that it is kind of blocking call. so I have wait till result gets back but again I pressess next char. I have to query from database. For each chars enter, I have query with entire text enterd from database. I want to implement AutoCompeltion like google search bar. As In google search bar, to get list for entred chars user has to wait.
Iwant that to be implemented in my applcation. I am using iPhoneSDK 3.0.
Same thing is running while I am pressing BackSpace. but the problem is that on iPhone Simulatior it application crashes if I press BackSpace continuously.
Can anybody give me hint ???
You could always implement your text lookup on a separate thread -- it might not offer suggestions as often, but it at least wouldn't block.
If you do this, make sure to "remember" the text the lookup is based on -- then, if the text in the UISearchBar no longer matches it, throw out the results you had -- the will no longer apply.
Example:
The user has typed "bri". Tour lookup determines that possible suggestions are "bridle", "bridge", "bride" and "brigand". If by the time your lookup returns the user has added a 'd', you don't want to suggest "brigand" any more. You don't necessarily have to throw out the whole list, but you want to at least remove the items that no longer work.