Alexa is undoubtedly one of the most used voice assistants and it is growing at a rapid speed. So there is surely a place for developers to take advantage of it. In this article, let’s see the basics of Alexa skill kit development.
I have previously covered a high level overview of how things work on Alexa. That article is for someone who is curious to know how Alexa works and doesn’t actually want to work on developing it. Take a look at it here.
- Amazon account.
- An AWS account for more flexibility (not mandatory)
Login to Amazon developer console by clicking here.
Let’s start with how to open a skill and how Alexa interprets it. Take a look at the following example.
Here, Alexa is a wake word. It is a reserved word so we can use it as our skill name. “Ask” is a launch word. Some alternate words for ask are start, open, tell , play, etc. Then comes our invocation name (our skill name). And finally the utterance. An utterance is basically the words that we expect our user to say.
An intent is nothing but the intention of our user. In our example the intent of the user is to get facts. An intent has a list of utterances that sometimes comes along with slots if required. So what are slots?
Slots are basically used to pick the important information that we try to pick from the user. It’s almost like a variable that also contains a type. For example, imagine you are creating a birthday skill which requires the user to tell their date of birth. In this case, we can declare a slot called date and select the type as AMAZON.DATE . It is also possible to create a custom slot type which I will be covering in future articles.
There are two ways a user can open our skill.
- Asking to open our skill ( Example: “Alexa open space facts”). In this case, it will go to the LaunchIntent by default.
- Asking directly to do some task (Example: “Alexa, ask space facts to tell me a fact”). In this case it will go to GetASpaceFactIntent (whatever your intent name is).
The lambda is what will handle the intent we receive from Alexa skill. The lambda function can be written in many languages, but Python and Nodejs are predominantly used. We can use it to handle our custom logic and return appropriate messages that Alexa must speak.
In case you are completely new to AWS then look into this article about what AWS is and what solution it offers?
Once you have a fair idea of above discussed topics you can surely start developing Alexa skills right away. There are many topics that are not mentioned here since those are not mandatory for every skill development. But according to your project requirement, you will need to learn certain topics. Happy coding!!