alexa-skills-kit

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

How can I get Alexa working on my iOS app?

不想你离开。 提交于 2019-12-04 14:56:11
I have been checking out the Alexa Skills kit the past few days. I have also been poring through the documentations for both the Skills kit and the Voice Service. I am just having a little hiccup trying to understand the flow. I have implemented one of amazon's sample skills (favourite colour sample) in the developer console and also wrote a sample lambda function to handle the type of response that will be delivered. Its working on the test simulator and what left is basically getting lambda running through my ios app. However I have the impression that I don't have to use the voice service.

How to call a SSL secured REST service within AWS Lambda

我怕爱的太早我们不能终老 提交于 2019-12-04 14:48:08
问题 Is it possible to do an REST call to https://owapi.net/api/v3/u/<Playername>-<BattleTagNumber>/stats via the JAX RS REST client withi AWS Lambda and if so, what do I have to set up with the Java SSL? Currently I do the following: System.setProperty("javax.net.debug", "all"); SSLContext sc = SSLContext.getInstance("TLSv1.2"); System.setProperty("https.protocols", "TLSv1.2");//Java 8 TrustManager[] trustAllCerts = { new InsecureTrustManager() }; sc.init(null, trustAllCerts, new java.security

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 set a AWS lambda trigger to Alexa Skills programatically

北战南征 提交于 2019-12-04 11:33:03
问题 I'd like to set the trigger of an AWS lambda that uses Alexa events to run the trigger, but I can't find anything in the SDK documentation. Does anybody know? I would be particularly happy if somebody showed me how to do it with the node.js SDK, but other ideas (CLI) are also welcome. I was playing around with the event source mapping SDK calls, but it doesn't seem to do the trick. I think the APIs were designed for Kinesis and Dynamo streams and just didn't catch up with latest Alexa

How to get an Alexa userId?

非 Y 不嫁゛ 提交于 2019-12-04 00:13:57
I'm building an Alexa Skill, and it requires that I store the userId of a user. I've tried to retrieve it with event.session.user.userId . However, when I call console.log(event.session.user.userId) the output is literally amzn1.ask.account.[unique-value-here] . I've looked at several similar questions, and none of them provide a clear enough answer for me. I'm not sure if this is a bug, a developer-only thing, or if the userId is simply anonymized. If so, is there a way to get the actual userId? I imagine there would be, since Amazon has written an entire guide on it here: https://developer

How to loop audio in Alexa

空扰寡人 提交于 2019-12-03 20:38:15
I am building a ambient audio skill for sleep for Alexa! I am trying to loop the audio so I don't have to download 10 hour versions of the audio. How do I get the audio to work? I have it build to where it will play the audio, but not loop. I've solved this problem in my skill Rainmaker: https://www.amazon.com/Arif-Gebhardt-Rainmaker/dp/B079V11ZDM The trick is to handle the PlaybackNearlyFinished event. https://developer.amazon.com/de/docs/alexa-voice-service/audioplayer.html#playbacknearlyfinished This event is fired shortly before the currently playing audio stream is ending. Respond to the

Linking Netatmo Weather Station to Amazon Echo (Alexa)

岁酱吖の 提交于 2019-12-03 16:53:42
[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 clientSecret = ""; var userId="a@google.ro"; var pass=""; function getNetatmoData(callback, cardTitle){ var

What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

感情迁移 提交于 2019-12-03 16:29:54
问题 I am trying to convert an mp3 file to the format expected by the audio tag in the Amazon Alexa SSML markup language as described here: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference The documentation recommends using https://www.ffmpeg.org/ffmpeg.html I tried this command but can't find the right codec to use: ffmpeg -y -i input.mp3 -ar 44100 -ab 48k -codec:a mpeg2 -ac 1 output.mp3 I know I need to convert the file