Create a do not forget list app on google home - reminders

Is it possible to create the following:
Me:"Hey Google, I'm leaving!"
Home:"Don't forget your keys, wallet & phone. Have a great day!"
Better yet:
M: "Hey Google, add "watch" to the "I'm Leaving" list.
H: "Ok. I have added "watch" to the "I'm Leaving" list.
Really cool:
M: "Hey Google, add "portfolio" to the "I'm Leaving" list.
H: "Ok. I will add "portfolio" to the "I'm Leaving" list. Would you like to add this to the list one time, or always?
M: "One time."
H: Ok. "Portfolio" will be mentioned in your next request of the "I'm leaving" list. It will then be removed.

Yes. Yes you can.
Details are left as an exercise to the reader.

Related

Inform7: How do I make Inform7 display text only once when you enter a room but display every time you enter that room

I would like to know if you can have Inform7 display something like say "Welcome to the room!".
only once when you enter that room. All preceding commands you type will not re-trigger this message but if you leave and re-enter the room it will display again.
The idea is that I have a person in the room who I want to have some greeting text.
Also if possible can I make their text print out after anything else that may be printed in the room?
You can record whether an actor has just arrived in a room using a new either/or property ("a new arrival" in this example) - set it in an after rule for the "going" action, and clear it in a general every turn rule. The greeting text can be displayed in another every turn rule - a more specific one to ensure that it runs before the general one that clears the property - restricted to cases where the person saying the greeting ("The Greeter" in this example) is both in the correct room ("The Greeting Room" in this example) and able to see a person who is a new arrival:
A person can be a new arrival.
A person is usually not a new arrival.
After going:
now the actor is a new arrival;
continue the action.
Every turn when the Greeter is in the Greeting Room and the Greeter can see a new arrival person:
if the player can see the Greeter:
say "Welcome to the Greeting Room![line break]".
Every turn:
repeat with newcomer running through new arrival people:
now the newcomer is not a new arrival.

Custom Slot wildcard value?

First off, I do not want to use AMAZON.Literal as it is for US only (I'm UK based) and I doubt it will be supported much longer.
I need a wildcard slot to allow users to say a place name (name of a shop for example), followed by the city.
City is easy, no problem.
The issue is the place name. I have a custom slot, but I can't list every shop in every city in the values.
I put a value of any in, which kind of works, but in my response, I'm only getting the last word if the user says a name that contains a few words e.g. Pound Land would just return Land.
Has anyone managed to do this?
As of 2018, you can use phrases to get user input that you may not be able to predefine.
{
"intents": [
{
"name": "SearchIntent",
"slots": [
{
"name": "Query",
"type": "AMAZON.SearchQuery"
},
{
"name": "CityList",
"type": "AMAZON.US_CITY"
}
],
"samples": [
"search for {Query} near me",
"find out {Query}",
"search for {Query}",
"give me details about {CityList}"
]
}
]
}
https://developer.amazon.com/blogs/alexa/post/a2716002-0f50-4587-b038-31ce631c0c07/enhance-speech-recognition-of-your-alexa-skills-with-phrase-slots-and-amazon-searchquery
When using custom slot types, AWS may return values from outside of the list yet it will try to map to the values. You can "hack" this behavior by providing a huge list of possible values. Maybe try to scrap a list of places and use that. I once tried with a list of 3000 landmarks and it was definitely returning slot values that were not in the list. The recognition was not great but I had an acoustic similarity function that allowed me to retrieve items from the list when needed. That was a while ago when they first talked about deprecating Amazon.LITERAL but eventually left it so I didn't have to worry about this.

Alexa not recognizing some slot values dependent on the sample utterances

I created an Amazon Alexa skill that has one intent (MyIntent) and two custom slot types (SlotA and SlotB). The intent schema looks like that:
{
"intents": [
{
"intent": "Foo",
"slots": [
{
"name": "CustomA",
"type": "CUSTOM_A"
},
{
"name": "CustomB",
"type": "CUSTOM_B"
}
]
}
]
}
Each slot has a couple of values, like SlotA having
865985
710000
927291
514000
and SlotB having
Photo
Car
Bed
Kitchen
My sample utterances look like that:
MyIntent foo bar {SlotA}
MyIntent bar baz {SlotB}
MyIntent {SlotA}
MyIntent {SlotB}
The problem is, that Alexa doesn't recognize some of my slot values, like "bed", but does recognize others like "kitchen". This applies to both slot types.
The interesting thing is, that all values get recognized, if I keep only the simple sample utterances and remove the ones including phrases and my sample utterances look like that:
MyIntent {SlotA}
MyIntent {SlotB}
The order of the values or the sample utterances is irrelevant. I tried every combination. Also having two slots (combining all slot values in one) does not make any difference.
Why are the sample utterances with phrases blocking the recognition of some of the slot values?
EDIT:
By "doesn't recognize" I mean the user's input is not mapped to MyIntent. While being in a dialog (session) I just get a SessionEndedRequest.
Amazon had a bug in their system, preventing the language recognition from being build correctly. After the bug was removed, everything is fine again. Here is the email from the Amazon support:
We recently made new tools available to help with the creation and
testing of skills. The new features inadvertently impacted a small
number of skills. We fixed the issue yesterday and all live skills
should work as expected. Please post here if you have any more issues
and we will monitor and provide assistance. For skills in development,
you can now resolve this issue by clicking ‘Save’ on the interaction
model tab or by clicking Build Model in Skill Builder (beta). We
apologize for the inconvenience.

failed to keep user on the same prompt when they enter the wrong nunber?

we'd like to keep user on the same prompt when they enter the wrong number, we have tried anything_else, and "true", "jump to", but it messed up, please take a look at the attached to reproduce it, Thanks
pleae enter "how much"
if you enter 6, it will lock the prompt(I assign 1 to 5 to different identification), this behavior is correct .
then enter 2, we will get messed up...
please import this json to reproduce it, thanks
https://drive.google.com/file/d/0B1YdUMoS4l7ub1BZdUg1c1dQeG8/view?usp=sharing
The better form is use the entitie pre-defined by IBM, #sys-number to get numbers from the user input. And you can use use with conditions and to get the number with context variable too, check the JSON example:
{
"context": {
"number": "<? #sys-number ?>"
},
"output": {
"text": {
"values": [
"Now is $hora. Sector please?"
],
"selection_policy": "sequential"
}
}
}
If user type two or 2, the entitie recognize!
You can use regex expression to obtain only the numbers you have pre-defined too!
How to active: -> Entities -> System Entities -> sys-number = ON:
Obs.: Waiting Watson TRAINNING after you active this entitie.
Example, with sys-number add in your node condition:
#sys-number:1
Check the image:
If user type the number correct:
Check the dialog if user dont type the correct number with true condition:
I did the example for you understand what I do for that:
Download the JSON for verify how to do it with REGEX here.
Download the JSON for verify how to do it with SYS-NUMBER here.
EDIT:
Refer your questions
In this case you can use regex, and use the context variable for make conditions in other node. My workspace with regex can help you with numbers. And, the variable $number you can use in the next node to verify if the user typed correctly the number.
And, the other case is to use the Jump to inside conversation. And use true if the user dont type the number correctly again.
Check my image:
Download the new workspace here.
Study more about conditions here.

Inform 7 error using If player consents

I'm trying to write a piece of interactive fiction using inform 7, I want to put a choice in there for the player and I want a simple yes or no I used the following code:
if the player consents say "You get a better view of the stranger."
Otherwise:
say "You can't make out what's happening clearly, however, you notice the stranger walking out of the pub"
I then get this useless error message:
You wrote 'if the player consents say "You get a better view of the stranger."' : but I can't find a verb that I know how to deal with. This looks like an 'if' phrase which has slipped its moorings, so I am ignoring it. ('If' phrases, like all other such instructions, belong inside definitions of rules or phrases - not as sentences which have no context. Maybe a full stop or a skipped line was accidentally used instead of semicolon, so that you inadvertently ended the last rule early?)
Any help would be greatly appreciated.
The punctuation is off. Phrases should end with a semicolon, and if phrases should use either begin..end blocks, or the "colon-and-indentation" style. So either:
if the player consents begin;
say "You get a better view of the stranger.";
otherwise;
say "You can't make out what's happening clearly, however, you notice the stranger walking out of the pub";
end if;
or
if the player consents:
say "You get a better view of the stranger.";
otherwise:
say "You can't make out what's happening clearly, however, you notice the stranger walking out of the pub";
Note the colons and semicolons and tabs in the second example.
Also, as the error message says, you need to specify when that question should be asked. If phrases must be inside rules or phrases. For example, if the question should be asked as a result of an action:
After examining the stranger for the first time:
say "Move closer?";
if the player consents begin;
say "You get a better view of the stranger.";
otherwise;
say "You can't make out what's happening clearly, however, you notice the stranger walking out of the pub";
end if;

Resources