DEV Community

mani-playground
mani-playground

Posted on

Building a simple Alexa voice app

Created a voice app using Violet, which is a javascript based opensource framework by developers at Salesforce.

Code sample is here

To test the alexa skill deployed locally, it can be exposed externally using ngrok so that Alexa server can access it.

After installing ngrok, below is the command to expose service running in local machine on port 8080.

ngrok http 8080

Screenshot_ngrok

In this case, the service can be accessed in the web using the below url (note : The link expires in 8 hours in the free version of ngrok)
https://561adde7bf38.ngrok.io/

The endpoint https://561adde7bf38.ngrok.io/alexa needs to be specified in Alexa developer console by selecting HTTPS under Endpoint section.

Screenshot_amazon_developer

Make sure to select below option
My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority

Sample interaction model json to be specified in the Alexa developer console under "Interaction Model -> JSON Editor" is included here

References :
https://hackernoon.com/how-to-build-a-voice-app-in-30-minutes-uz6132kj
https://i3labs.org/2019/03/getting-inputs-for-your-voice-app
https://www.macadamian.com/learn/developing-alexa-skills-locally-with-ngrok-and-node-js/

Top comments (0)