alexa-skill

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

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 configure Alexa ask-cli with a valid AWS profile?

强颜欢笑 提交于 2019-12-05 20:20:03
问题 After playing around with the nice browser GUIs of developer.amazon.com and aws.amazon.com things getting serious and now I want to use ask-cli to initialize Alexa skills and their lambda functions. When I want to ask init , it tells me, I should select a profile or create a new one. Both jump to the browser and use OAuth to authenticate my ask installation. ~ ask init ? Please create a new profile or overwrite the existing profile. (Use arrow keys) ────────────── ❯ Create new profile ───────

Returning handler.ResponseBuilder from promise.then() method

空扰寡人 提交于 2019-12-05 19:02:38
In one of the intent handler for my Alexa skill I have to return response once my promise is resolved. Code looks like this : var rcvPromise = receiveMsgQ(); rcvPromise.then(function(speechText) { console.log('rcv Promise resolved with ',speechText); return handlerInput.responseBuilder .speak(speechText) .withSimpleCard('skill_name', speechText) .withShouldEndSession(false) .getResponse(); }); Skill returns with ERROR message with no additional details about error. Is there any way to fix this problem? PS: I need to use promise as receiveMsgQ() is asynchronous function call. The error you're

ASK CLI to deploy to different environments?

笑着哭i 提交于 2019-12-05 12:14:13
Is it possible to use Alexa Skill Kit's ASK CLI deploy command to build, for example, a debug version of the app that deploys a development environment and a release version of the app that deploys to a test environment? My team and I are trying to deploy the same skill to two different environments, so our testing team can do their thing in the test environments and development can do their thing in the development environment. This will be a private skill so using http://developer.amazon.com separation of test and "prod" via publishing the application is not an option. There are probably a

Alexa Skills Kit (ASK) and Utterances

孤街浪徒 提交于 2019-12-05 05:46:48
I am developing a simple, custom skill for Alexa. I have it up and running, and hosting the handler on AWS Lambda. It's working fine except... In the test UI, if I enter a valid utterance, e.g., help, cancel, swim, run (two custom utterances), everything works well; however, if I enter a nonsense utterance, e.g., dsfhfdsjhf, the Alexa service always maps the nonsense to the first valid intent in the intents schema. In my lambda code, I have a handler for handling unknown intents; however, the intent is never unknown. Is this an artifact of the test interface? Something else happening? Thanks,

Linking Netatmo Weather Station to Amazon Echo (Alexa)

Deadly 提交于 2019-12-05 00:59:14
问题 [Full tutorial in the answered question below. Feedback welcome!] I am trying to create an AWS Lambda function to use for an Amazon Alexa skill to fetch weather information from my Netatmo weatherstation. Basically, I need to connect to the Netatmo cloud via http request. Here's a snippet of my code, the http request is done for the temporary access token, the request is ok but the result body is body: {"error":"invalid_request"}. What could be the problem here? var clientId = ""; var

Alexa Skill Development using flask-ask and ngrok

烈酒焚心 提交于 2019-12-04 19:17:34
问题 I'm trying to begin developing a skill for alexa using flask-ask and ngrok in python. Following is my code: from flask import Flask from flask_ask import Ask, statement, question, session import json import requests import time import unidecode app = Flask(__name__) ask = Ask(app, "/reddit_reader") def get_headlines(): titles = 'is this working' return titles @app.route('/') def homepage(): return "hi there, how ya doin?" @ask.launch def start_skill(): welcome_message = 'Hello there, would

How to handle synonyms in intents in Alexa?

核能气质少年 提交于 2019-12-04 14:36:00
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" } ] } We need to handle the entity resolution in your backend code. More can be referred here: https://developer.amazon.com/blogs/alexa/post/5de2b24d-d932

How to configure Alexa ask-cli with a valid AWS profile?

梦想的初衷 提交于 2019-12-04 02:34:56
After playing around with the nice browser GUIs of developer.amazon.com and aws.amazon.com things getting serious and now I want to use ask-cli to initialize Alexa skills and their lambda functions. When I want to ask init , it tells me, I should select a profile or create a new one. Both jump to the browser and use OAuth to authenticate my ask installation. ~ ask init ? Please create a new profile or overwrite the existing profile. (Use arrow keys) ────────────── ❯ Create new profile ────────────── Profile Associated AWS Profile [default] ** NULL ** [aws_profile] ** NULL ** But the AWS