alexa-skills-kit

Simplest example for streaming audio with Alexa

我怕爱的太早我们不能终老 提交于 2019-11-29 17:24:26
问题 I'm trying to get the new streaming audio API going. Is the following response valid? I'm getting a "there was a problem with the skill" error when I test it on my device. Here is the code for my AWS-lambda function: def lambda_handler(event, context): return { "response": { "directives": [ { "type": "AudioPlayer.Play", "playBehavior": "REPLACE_ALL", "audioItem": { "stream": { "token": "12345", "url": "http://emit-media-production.s3.amazonaws.com/pbs/the-afterglow/2016/08/24/1700

Node.js Lambda function returns “The response is invalid” back to Alexa Service Simulator from REST call

前提是你 提交于 2019-11-29 16:11:46
Having issues making a REST call to an API between a node.js Lambda function and Alexa. I'm using the request library to make the calls with an account linked skill. I've only set one sample utterance for the intent, and the simulator see this fine. Also, the cloudwatch logs show a 200 response code from the api endpoint and any of the returned data from the API from console.logs to CW. 'use strict'; var http = require('http'); var request = require('request'); var Alexa = require('alexa-sdk'); var APP_ID = "amzn1.ask.skill.XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX"; exports.handler = function(event,

How are consumed read capacity units calculated in DynamoDB query

孤街浪徒 提交于 2019-11-29 15:18:24
问题 I've seen the page on amazon and understand that 1 RCU is a 4KB item. If I have a table with 50 items, I've read that a scan will read the full 50 items and use 50 RCU. But lets say I did a query, my table is 10 by 5, will it still use 50 RCU? 回答1: Scanning a table that contains 50 items will consume 50 RCU only if the total size of the 50 items combined equal 200KB (for a strongly consistent read, or 400KB for an eventual consistent read). Most items are not that big, so a 50 items typically

How do I create an Alexa Skill that gets data from an HTTP/HTTPS API (using “Alexa Skills Kit” for Node.js on AWS Lambda)

微笑、不失礼 提交于 2019-11-28 21:41:46
问题 I want to create a skill for Amazon Alexa that - when triggered by voice commands - gets some information from an API via a HTTPS request and uses the result as spoken answer to the Alexa user. There is a little challenge here (especially for node.js newbies) due to the event-driven concept of node.js and the internals of the Alexa Skills Kit for Node.js. And getting a hand on parameters from the user isn't that easy, either. Can somebody provide some sample code to start with? 回答1:

Amazon Alexa skill: We were unable to link xxxx at this time. And with 401 Unauthorized

眉间皱痕 提交于 2019-11-28 14:49:07
Amazon Alexa skill: We were unable to link xxxx at this time. And with 401 Unauthorized. =================================================================== Skill model: CUSTOM Skill STATUS: In Development Account Linking: Auth Code Grant Client Authentication Scheme: "HTTP Basic" (Credentials in request body is the same error) Default Access Token Expiration Time: 360 1,Use Browser on Microsoft Windows open https://alexa.amazon.com/spa/index.html In "DEV SKILLS", Enable my CUSTOM skill, Amazon Alexa service accesses my "Authorization URI" and asks for the "code". I send the "code" to it's

How to obtain userId specified by Alexa user during account linking

≡放荡痞女 提交于 2019-11-28 12:10:59
问题 During account linking process, Alexa user is redirected and presented with a form to enter his credentials (ID and/or password). Based on what's provided, the user is then being validated by the authentication flow, upon which success an accessToken is embedded in Alexa request and the user is redirected to the OAuth resource. Is there a way to pass the ID of the user obtained in the above interaction as part of the Alexa request (JSON session\user\userId ), instead of (or in addition to) it

Get location from Alexa Skills Kit (ASK)

泪湿孤枕 提交于 2019-11-28 08:15:47
I'm looking for a way to get the user's location, ideally longitude/latitude but address would work too, from the Alexa Skill Kit request to my custom skill. Also, I don't want to have to have the user link to an account on my app's side. Is this possible? If so, how? As per this thread on the Amazon Developer forums , there is not currently (as of May 2016) a way to get user location via the publicly available APIs. The only skills able to do so, such as Uber or Domino's, are utilizing APIs that are not available through the Alexa Skills Kit. However, there's hope that it may be added, as

Amazon Alexa: store user's words

做~自己de王妃 提交于 2019-11-28 07:30:05
I'm new to writing Alexa skills and want to write a skill to store the speaker's words. For example, if I say, 'Alexa, save {whatever i say}', it should save the words in some string. Now from what I understand, the intent schema something should be like { intents:[ "intent" : "SaveIntent" ] } and utterances like SaveIntent save SaveIntent store In this case, how do I store '{whatever I say}'? To capture free-form speech input (rather than a defined list of possible values), you'll need to use the AMAZON.LITERAL slot type. The Amazon documentation for the Literal slot type describes a use case

Get unique device id for every amazon echo devices

人盡茶涼 提交于 2019-11-27 19:30:01
问题 I need to make a Custom Skill for the Alexa Skills Kit, which should be one echo device in every room. I need to get the device_id for every echo device. I heard this isn't possible, but maybe it changed, or if not is there any other way around. 回答1: You can do it now! context:System:device:deviceId As far as I can tell it only works on real devices. So if you are testing in the developer's Skills Manager you don't get the field, but when used with a real Alexa device, it works. 回答2: This is

How do I add python libraries to an AWS lambda function for Alexa?

若如初见. 提交于 2019-11-27 18:45:02
I was following the tutorial to create an Alexa app using Python: Python Alexa Tutorial I was able to successfully follow all the steps and get the app to work.I now want to modify the python code and use external libraries such as import requests or any other libraries that I install using pip. How would I setup my lambda function to include any pip packages that I install locally on my machine? As it is described in the Amazon official documentation link here It is as simple as just creating a zip of all the folder contents after installing the required packages in your folder where you have