13
votes

I am trying to use the sample code provided for Amazon Alexa API, and trying to run hello world / history buff examples through the computer. How do I test from my local machine, about the request and response formats. In the README file it is given to visit this website : http://echo.amazon.com/#skills, but I could see nothing there as it mentions more about connecting to the device. I dont have the device, but I would like to test things locally through my laptop.

6
I am actually planning to use this service in some other application, not through the amazon echo device. - vidyasagarr7
You could define your own skill following this developer.amazon.com/public/solutions/alexa/alexa-skills-kit/… and then debug with the console there. I am not sure, if every thing is possible without an Alexa device, I would guess though. edit: this could help a lot: developer.amazon.com/public/community/post/TxDJWS16KUPVKO/… - choli
@choli: thanks a lot. But looking more into the dev pages, it says we could use alexa skill set for manufacturers but, and it talks about the login through website or app. I want to integrate this with an app or a website, say just some webpage that makes a (predefined as specified in skill set) conversation with you. Would like to know I can achieve this. - vidyasagarr7

6 Answers

9
votes

We have a tool that we built specifically for this purpose: https://bespoken.tools/blog/2016/08/24/introducing-bst-proxy-for-alexa-skill-development

Requests and responses from Alexa will be sent directly to your development laptop, so that you can quickly code and debug without having to do any deployments. We have found this to be very useful for our own development.

Our Github project is here: https://github.com/bespoken/bst

We are also adding other useful commands for Alexa development.

7
votes

Yes, the Test tab in the Alexa Developer Console allows you to interact completely with your skill during development.

You will type in your utterances instead of speaking them, but from a program logic perspective, there is no difference.

The Test page also provides a place to type in your skill's reponses, to see what they'll actually sound like. I recommend that you do so if you don't have an actual device. Sometimes adding or removing a comment can help make the responses easier to understand, or sound more natural.

2
votes

I'm guessing the key point in OP's question is "dont have the device".

There is a web simulator at https://echosim.io

It behaves just like any other Alexa 'device'. Login with your Amazon account and it picks up all your selected skills, etc. Shows up as just another device in the Alexa app.

Only downsides: You have to click to talk, and it's pretty slow, presumably because it has to receive, buffer, convert and re-ship the audio.

Also, I'm not sure how you register/connect to the Alexa service in the first place without an Echo/Dot device, but I assume there is a way.

UPDATE:

More recently, there are a number of free 3rd-party apps on Android and iOS devices to also simulate an Alexa/Echo device. It can be less klunky than the web site. Search for 'Alexa' in your App/Play store and try a few of them out. "Reverb" is one: https://itunes.apple.com/us/app/reverb-for-amazon-alexa/id1144695621

Good luck.

0
votes

I dont have the device, but I would like to test things locally through my laptop.

If you are developing the skill using an AWS Lambda function in Python, have a look at: https://pypi.python.org/pypi/FirstAlexaSkills/0.1.2

It can generate custom Alexa events based on your parameters (utterances, slot variables) and allows you to create test cases against your local code, as well as against AWS Lambda itself.

0
votes

You can also test your skill locally by following this tutorial: How to test your Alexa skill locally