Amazon Alexa is undoubtedly one of the voice assistants that has started to gain more crowd. If you are someone who is wondering how the Alexa actually works in the background and also don’t want to get lost with deep technical terms, then you are at the right place.
All that is needed is a WIFI and microphone, and every device can become Alexa. Also, lots of device manufacturers are enabling Alexa. So it’s not only Alexa echo devices that we are talking about. Once Alexa is available through all of these devices what content do users have access to? And these are called Alexa skills.
Every custom skill in Alexa are being developed using an Amazon developer console.
The developer console looks like this.
On the left side of the console you can see something called as Invocation. It basically contains the launch word of the skill.
Then under the Interaction model you can find something called as Intents. It is an integral part of Alexa skill development as it captures what the user says and helps the backend to decide based on the intent that is triggered. Let us understand with an example.
The above diagram shows the default hello world skill. The intent name is HelloWorldIntent and you can notice something called sample utterances. It is nothing but, what are all the ways a user can speak in order to trigger this intent.
Now once this intent is fulfilled it calls an AWS lambda function which basically handles and returns what the Alexa should respond to.
In this example when a user say, “Alexa, Open hello world” it will come to the LaunchRequestHandler class, which responds with “Welcome, you can say hello or Help, Which would you like to try?”
Now if the user replies “hello”, then HelloWorldIntentHandler will be triggered and replies “hello” as shown below. If you are someone new to AWS then check out this post to know What is AWS and what solution do they offer.
Amazon provides an Alexa stimulator to test our skills. The below screenshot shows the working of the hello world skill that was created.
The JSON input is the data that went inside the lambda function and the JSON output is the response from it. The speak tag in JSON output acknowledges Alexa to speak. In the upcoming days, I will post more content about Alexa skill development. Stay tuned.
Happy programming!!
2 thoughts on “Alexa Skill Development Walk Around”