alexa-skills-kit

How to get the time zone or local time of Alexa device

99封情书 提交于 2019-12-23 14:47:48
问题 I want to get the "time zone" set in the settings or local date time of the Alexa device. Is there any API available for it? Or is there any option to get the date-time of the user using his postal code? Any help will be highly appreciable? 回答1: Yes, there is a native Alexa API that you can use. Here is a perfect solution for what you're looking for. What you will need is a device ID and an API access token. Also, few tools like axios ( npm i axios) and zip-to-country-code (npm i zipcode-to

How to get the time zone or local time of Alexa device

本小妞迷上赌 提交于 2019-12-23 14:45:52
问题 I want to get the "time zone" set in the settings or local date time of the Alexa device. Is there any API available for it? Or is there any option to get the date-time of the user using his postal code? Any help will be highly appreciable? 回答1: Yes, there is a native Alexa API that you can use. Here is a perfect solution for what you're looking for. What you will need is a device ID and an API access token. Also, few tools like axios ( npm i axios) and zip-to-country-code (npm i zipcode-to

Alexa skills custom slot for date times

亡梦爱人 提交于 2019-12-23 12:23:07
问题 So, I'm working a project with the Amazon Echo. My goal is to record when I did a specific action and to record it into a DB. My issue is timezones, and I avoid this by using epoch time. However, from what I can tell of custom slots for an intent, my choices are formatted date strings with no time, or formatted time strings with no dates, and on top of all of that, I have no way of grabbing the client's timezone without specifically asking for it based on some forum posts I found with my

How to keep an alexa skill open?

心不动则不痛 提交于 2019-12-23 07:40:47
问题 I have created a skill so that people can keep track of some state. But instead of asking alexa everytime to open the app and interact. alexa ask grocerylist to add 2 eggs alexa ask grocerylist to add bread I would want to keep the grocerylist skill open so that users can interact with it until they ask it to close alexa open grocerylist .... 2 mins later add 2 eggs .... 1 min later add bread Is there a way to do this without having to use alexa ask grocerylist every time. 回答1: This is not

Alexa Dialog Model Step and dialogState is never in COMPLETED

*爱你&永不变心* 提交于 2019-12-23 05:15:52
问题 I'm implementing an Alexa Dialog Model with an PHP Endpoint. I used the Alexa doc (https://developer.amazon.com/fr/docs/custom-skills/dialog-interface-reference.html) Here is my example: My skill: RequestIntent Utterance : add an {obj} in the bedroom Slots : {obj} / Slot Filling Phrase: Me : Alexa, Add an object in the bedroom Alexa : What object do you want to add in bedroom ? Me : I would like to add a cars in the bedroom Alexa : You want to add a car in the bedroom ? Me : Yes STEP1:

Alexa input validation for type AMAZON.NUMBER using dialog model

試著忘記壹切 提交于 2019-12-22 10:37:47
问题 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

Returning handler.ResponseBuilder from promise.then() method

柔情痞子 提交于 2019-12-22 10:34:30
问题 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

How to loop audio in Alexa

柔情痞子 提交于 2019-12-21 06:23: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. 回答1: 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

Alexa not finding my Skill

偶尔善良 提交于 2019-12-21 04:24:32
问题 I created my Alexa Skill as an AWS Lambda Node.js app based on one of the provided examples in the Alexa Skills Kit. I followed all the instructions: My Echo is registered with the same account as my developer account on AWS I configured my Skill on the Amazon developer console I put my application ID from the console into my application code I uploaded my code to the AWS Lambda service (set to N. Virginia, as instructed) I tested my service and it returned the expected JSON I entered my ARN

Hosting a custom skill to Alexa by implementing a web service

巧了我就是萌 提交于 2019-12-21 02:51:38
问题 I am working on developing a web service which is used to Handling Requests Sent by Alexa and respond back with specific response in .net framework. The request body sent by Alexa to your service in JSON format like below : { "version": "string", "session": { "new": true, "sessionId": "string", "application": { "applicationId": "string" }, "attributes": { "string": {} }, "user": { "userId": "string", "accessToken": "string" } }, "context": { "System": { "application": { "applicationId":