How to get the second utterance- Alexa - alexa

I am trying to build a conversational skill in Amazon Alexa. Once I start my skill, how can I know what the user said for the second time when I set should_end_session as false?

How do you mean what the user said for the second time? Any response a user provides in a live session should match one of the utterances for your skill and those utterances are linked to intents.
What response are you trying to get from the user? Please provide more information.

Related

Creating a survey in amazon Alexa with open ended questions

I am trying to create a simple survey skill in Amazon Alexa where Alexa asks the user a question and they respond in any manner they feel like (open-ended). For example, if Alexa asks "Do you cook?", a user may respond in many ways such as "Yes I do cook", "My son does the cooking" etc.
The issue I am getting is that the questions can have similar responses so when I create an utterance in the Alexa dev console they overlap (utterance conflicts) and I am redirected to the error handler. (note each question has its own intent)
Is there any other way I can go about creating a survey without using intents?
Can I capture the full user response to a slot?
The reason being I want to store the user's response in a database.
Unfortunately, Alexa Skills aren't designed to do Speech To Text.
When a user talks to a device, the request goes through multiple steps:
Automated Speech Recognition > It does Speech To Text internally
Natural Language Understanding (NLU) > Using Machine Learning, it will understand what the user want to do (Stop a skill, play music, switch on the light, ...)
Depending of the context, if the NLU understand that the user is trying to respond to your skill (the interaction model match what the user is saying), it will send a POST request to your skill. But it will not send you the Speech To Text.
Documentation
Although, the intent AMAZON.SearchQuery will do the job but you will have to use a prefix: My answer is {query} and not directly {query} because all requests will be redirected to this intent otherwise. It will not look like a good & smooth user experience.

How to make multistatement request with Alexa Skill

I am building an Alexa Skill and I need that when the user asks for information but it's missing the required fields for the back-end, Alexa asks the user back for this information. For example:
If the user asks What's the temperature? but does not give a location, Alexa asks back the location so it can be passed with the request to the back-end.
Another example is when you want to set a reminder and ask Alexa Set a reminder, she asks you for what and when is the reminder. I want to do the same with my skill.
Reading the documentation I noticed that there's a reprompt and a shouldEndSession entry in the response Object. Is this the right way to do what I want? Or is there any other way to achieve it?
I believe I found an answer. There is a directive for asking the user for missing values: the Dialog.ElicitSlot.
Similar question: Alexa input validation for type AMAZON.NUMBER using dialog model

Alexa Skill - Retrieve User's mail within multi-turn dialog

I am developping an Alexa Skill within the one the user has to provide a serie of answers to my backend (node.js) in order to get the right result. I would like to send this result by email.
Is it possible to retrieve the user's email through the API put at disposal by AWS using the Dialog.delegate method?
Thanks !
There is no built in method can get you the current user email id or any personal info.
But with authentication you can. See this blog post. You'll need to create an Amazon App and link it to your amazon skill using Account Linking. For the first time when you ask for the email, user has to accept access with their Alexa app. You can then save this email in your DB for future purposes. This is a long but recommended method.
The simplest method: Whenever the game is finished you can manually ask the user for email address. But Alexa may not recognize email address spoken by users properly and might break your app. I don't know, but maybe Alexa will reject your app for asking personal info this way!

Alexa skill ki manual input

I am new in Alexa skill kit development
I have already read Tutorials on Alexa Skill Kit
I have to implement Alexa Skill , In which I need to manually send command and want Alexa to speak it.
i.e When user login in system I can fire API as Alexa request and I want Alexa device to Speak that for example "Welcome Have a great day"
Is it Possible ? Or Any other alternatives. ?
Notifications for Alexa skill are in still in beta. You can apply for the access to it by filling up this form here : https://alexa.au1.qualtrics.com/jfe/form/SV_72lplGGegxNZ9Ln
If Push Notifications is what you're looking for, then the answer is YES.
Since in the comments you said, "You are not asking for HOW TO DO IT", so I'll just let this link here for your reference. https://developer.amazon.com/docs/alexa-voice-service/notifications-overview.html
I think you may want to use proactive events for your skill. They are now commercially available. You will be able to send a notification to your skill and the Amazon device will blink (yellow). However you will still need to say "Alexa check my notifications" to retrieve the actual message
https://developer.amazon.com/docs/smapi/proactive-events-api.html
Another idea would be to use "progressive response" feature: https://developer.amazon.com/docs/custom-skills/send-the-user-a-progressive-response.html
You can fire the interaction to alexa when your API is invoked and send a progressive response. Not really a notification but it might serve you. This way you will not need to ask to check the notifications to Alexa but directly get the voice message in the progressive responses

How to make phone call from custom alexa skill

My intent to call the specified phone number from my own skill.
For example
Me: Alexa, ask <invocation> to find the customer service number
Alexa: Sure, the customer service number is 1800-xxx-xxx-xxx. Would you like to call
Me: Yes
[HOW TO MAKE CALL NOW?]
It would be possible to open a phone call from your programmed skill (alexa skill service). But for sure you not just want to start the call but also that the user can speak into alexa? But it's not possible to get the voice from the user.
Amazon Alexa transfers the speech input into text.
Your skill service only get JSON requests from the amazon skill interface with intents and spoken things as text.
So there is no chance to the get the audio track from the alexa user. Also stated in the forum
There is a feature request - you should watch this feature and vote for it.
Or you implement something like a callbackservice that you interconnect users telephone to service customer number. E.g. via an app on the phone - see this
You can make a call using your echo device or using the Alexa app as long as contact is in your list using Alexa Calling. Calling is only supported in U.S., U.K., Canada, and Mexico.
Here is another link to help you setup
https://au.pcmag.com/gallery/60053/how-to-call-someone-from-your-amazon-echo

Resources