alexa

How to use async functions within Alexa skill properly?

蹲街弑〆低调 提交于 2021-02-11 17:41:58
问题 I am very new to async programming, so forgive me for the lack of understanding, but I am currently building an Alexa skill which calls a private parking API. You can call this API and it will give you the nearest parking spots. const getParkingSpots_Handler = { canHandle(handlerInput) { const request = handlerInput.requestEnvelope.request; return request.type === 'IntentRequest' && request.intent.name === 'getParkingSpots' ; }, handle(handlerInput) { const request = handlerInput

Connecting conversational AI to Alexa

蹲街弑〆低调 提交于 2021-02-08 09:10:31
问题 I built my Conversational AI chatbot and followed all the steps to connect it to Alexa but when I try to call my chatbot in alexa simulator,I get the following message: "There was a problem with the requested skill's response" this is the code which appears on JSON output 1 and JSON output 2 after the error: { "version": "1.0", "session": { "new": true, "sessionId": "amzn1.echo-api.session.5e3bb3da-ba51-4422-80cb-c5cace7e3756", "application": { "applicationId": "amzn1.ask.skill.bfb81ac5-d463

How to get and use confirmation 'yes' or 'no' for Alexa skill intent response

99封情书 提交于 2021-02-07 06:25:07
问题 I am developing a Alexa skill in which on launch it will ask Do you want to perform something ? Depending upon user's reply 'yes' or 'no' I want to launch another intent. var handlers = { 'LaunchRequest': function () { let prompt = this.t("ASK_FOR_SOMETHING"); let reprompt = this.t("LAUNCH_REPROMPT"); this.response.speak(this.t("WELCOME_MSG") + ' ' + prompt).listen(reprompt); this.emit(':responseReady'); }, "SomethingIntent": function () { //Launch this intent if the user's response is 'yes'

How to get and use confirmation 'yes' or 'no' for Alexa skill intent response

怎甘沉沦 提交于 2021-02-07 06:24:32
问题 I am developing a Alexa skill in which on launch it will ask Do you want to perform something ? Depending upon user's reply 'yes' or 'no' I want to launch another intent. var handlers = { 'LaunchRequest': function () { let prompt = this.t("ASK_FOR_SOMETHING"); let reprompt = this.t("LAUNCH_REPROMPT"); this.response.speak(this.t("WELCOME_MSG") + ' ' + prompt).listen(reprompt); this.emit(':responseReady'); }, "SomethingIntent": function () { //Launch this intent if the user's response is 'yes'

How do I get the canonical slot value out of an Alexa request

半腔热情 提交于 2021-01-29 08:30:37
问题 I am attempting to write an Alexa skill with custom slots, but Alexa ignores my synonyms. Apparently Alexa.getSlotValue(requestEnvelope, 'intentSlotName'); will retrieve the actual spoken words, as opposed to the canonical value. I am comparing against the canonical values to determine program behavior, so I would really prefer my slots to return the canonical value when I hit a synonym, rather than the synonym itself. How do I do this? I have been having some trouble finding the answer in

Connecting Alexa skill to mysql database using node.js and aws lambda

我们两清 提交于 2021-01-29 05:55:33
问题 I am trying to connect my Alexa skill to an Amazon RDS mySQL database using node.js in AWS Lambda. I tested the connection before uploading it to lambda and it worked but when I upload it I get a 'process exited before completing request' or a 'There was a problem with the skills response' error. 'use strict'; const Alexa = require('alexa-sdk'); const APP_ID = 'amzn1.ask.skill.11069fc0-53bc-4cd0-8961-dd41e2d812f8'; var testSQL = 'SELECT weight, height from users where pin=1100'; //===========

AVS with Alexa Skills

纵然是瞬间 提交于 2021-01-28 15:26:42
问题 Is it possible to use Alexa Skill with Alexa Voice Service (AVS)? I can't find any AVS API to link to user's Amazon account to enable certain Skills. Is it possible that to use Skill on a third party Alexa device? 回答1: I believe this is what you're looking for. https://developer.amazon.com/docs/alexa-voice-service/setup-authentication.html Alexa isn't Alexa without skills, and AVS essentially just allows Alexa to work on devices that Amazon didn't create. Once you create your third-party

Intent ConfirmationStatus cannot be changed with Dialog.Delegate directive

≯℡__Kan透↙ 提交于 2021-01-28 05:25:53
问题 I have a dialog where I delegate Alexa to collect two slots and ask the confirmation prompt. If the user says "no" to the confirmation prompt, I want to restart the dialog by deleting the slot values and setting the intent confirmationStatus to "NONE". While Alexa starts to elicit the first slot, the confirmation status remains as "DENIED" which leads to a loop. I used the method described here to reset the status. This is the updated intent sent back from my skill { "name":

How to add single word invocation name alexa?

南笙酒味 提交于 2021-01-27 20:12:11
问题 I want to add a single word invocation name for Alexa, in documentation its mentioned that a single word is allowed. One-word invocation names are not allowed, unless: The invocation name is unique to your brand/intellectual property with proof of ownership established through legitimate documentation, or (German skills only) The invocation name is a compound of two or more words. In this case, the word must form an actual word in the skill's language to ensure that Alexa can recognize it.

How to make Alexa countdown in seconds

不羁的心 提交于 2021-01-27 11:53:45
问题 I want to be able to have alexa (audibly) countdown 15 seconds in my skill. I know I can just <break time="15s" /> in SSML. But that isn't audible. I also know I can just do: 15<break time="1s" /> 14<break time="1s" /> or better yet (to account for the time it takes to say the number) 15<break time="0.85s" /> 14<break time="0.85s" /> But that's going to be a ton of repeated code if I do this many times over. So I'm probably going to write a function that takes in a number and a number of