alexa

How to create an event in google calendar from another Alexa Skill Kit?

为君一笑 提交于 2019-12-08 01:18:20
问题 I am building a Alexa Skill Set which returns list of events. I would like to my skill to book an appointment for selected events by the user. If the user says "Alexa book appointment for the last event", I want my skill to handle it and book an event in the linked calendar. How do I get access to the linked calendar within my skill? 回答1: For this, you need to get access to the user's calendar, which you can get via account linking. You can find more information by Amazon here: Link an Alexa

Node JS callbacks with Alexa skill

夙愿已清 提交于 2019-12-07 15:27:48
问题 I have a module that includes a request call, which doesn't appear to be getting executed. var request = require('request'); var Alexa = require('alexa-sdk'); var APP_ID = <my alexa app ID>; var self = module.exports = { handler : function (event, context, callback) { var alexa = Alexa.handler(event, context); alexa.appId = APP_ID; alexa.registerHandlers(self); alexa.execute(); }, "TestIntent": function () { var speechOutput = "Recorded Test"; request("http://www.google.com", function(error,

AudioPlayer “PlaybackNearlyFinished” Request of Alexa Skills Kit, Not Working

狂风中的少年 提交于 2019-12-07 13:48:45
问题 I've written an Alexa Skill that uses a Lambda Function to play unique audio from a given URL. The Intent called "PlayAudio" is working and plays the first audio item from our JSON-formatted API. The Intent called "PlaybackNearlyFinished" does not work, aka, does not play the audio file I am feeding it. Can anybody crack exactly why this doesn't work? Here is a section from my Lambda Function, which contains the two Intents: Fact.prototype.intentHandlers = { "PlayAudio": function (event,

Amazon Alexa - How to create Generic Slot

浪尽此生 提交于 2019-12-07 06:54:53
问题 How can I create a generic slot for an Alexa skill? So that I can create my own Todo app and it will recognise the free form text. 回答1: The Alexa blog announced a List Skill API. As mentioned above, the literal slot type is no longer supported for new skills. If you create a custom slot with a number of values - depending on your expected response values with a single word or 2+ words - Alexa will catch also spoken words not on the list and pass them to your skill. Transcription of these

How to return Dialog.Delegate directive to Alexa Skill model?

假如想象 提交于 2019-12-07 06:04:03
问题 I want to create a simple multi-turn dialog with the Alexa Skill model. My intent consists of 3 slots, each of which are required to fulfill the intent. I prompt every slot and defined all of the needed utterances. Now I want to handle the request with a Lambda function. This is my function for this specific Intent: function getData(intentRequest, session, callback) { if (intentRequest.dialogState != "COMPLETED"){ // return a Dialog.Delegate directive with no updatedIntent property. } else {

How to implement a next intent in alexa

吃可爱长大的小学妹 提交于 2019-12-06 16:09:46
How do you implement an 'AMAZON.NextIntent' in an alexa skill. suppose I have 3 audios(a1, a2, a3) enqueued and a1 is playing. If the user sends the request using 'nextIntent', what should be the response so that alexa plays a2? Alexa SDK provides you ability to keep the state in session attributes. For Node.js it's this.attributes . You can read more about here in Skill State Management section. You can keep the current step in that attribute. Once your skill is started you can set the current step to "first" (or 1, or whatever). Once the AMAZON.NextIntent is triggered, you check the state of

How to handle synonyms in intents in Alexa?

我的梦境 提交于 2019-12-06 07:21:39
问题 In the following example: If the user says toffee, shouldn't that be translated to candy? I ask because the value handed to my intent is 'toffee'. So not sure what I have incorrect. types":[ { "name":"SHOPPING_LIST", "values":[ { "id":null, "name":{ "value":"candy", "synonyms":[ "toffee" ] } }, { "name":"GetPrice", "samples":[ "Get me the price of {item}", "tell me the price of {item}", ], "slots":[ { "name":"item", "type":"SHOPPING_LIST" } ] } 回答1: We need to handle the entity resolution in

Alexa input validation for type AMAZON.NUMBER using dialog model

安稳与你 提交于 2019-12-06 04:11:25
I am using the ASK SDK 2.0 for Node.js. I have a skill that uses a dialog model to prompt the user for a series of inputs, all of which are required slots with the type AMAZON.NUMBER. When a user gives a numerical response, everything works fine. However, if the user gives a non-numeric response, such as "yellow", the slot value is filled in with: "value": "?" and moves on to propmpt the user for the input for the next slot. How can I get it to reprompt the user for that slot again if they provide an invalid response? I've poured over the documentation and can't find anything. Ideally I would

How to end session for custom Alexa skill?

本小妞迷上赌 提交于 2019-12-06 03:37:56
问题 I am creating a custom skill for Alexa. I want to close the session on AMAZON.StopIntent . How can I achieve this with below code? const ExitHandler = { canHandle(handlerInput) { const request = handlerInput.requestEnvelope.request; return request.type === 'IntentRequest' && (request.intent.name === 'AMAZON.StopIntent'); }, handle(handlerInput) { return handlerInput.responseBuilder .speak('bye!') .reprompt('bye!') .getResponse(); }, }; 回答1: Alexa ends the session when shouldEndSession flag is

How to make phone call from custom alexa skill

对着背影说爱祢 提交于 2019-12-06 01:15:32
问题 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?] 回答1: 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