Alexa is the virtual assistant created by Amazon – a phenomenal example of conversational Artificial Intelligence (AI). Alexa is now compatible with a host of smart devices and this technical collaboration is making human life seamlessly easier. The biggest advantage that one can attribute to Alexa’s smooth integration into our lives is that Alexa has under her Amazon Prime and Amazon Music and of course it has to its fame the largest online retailer in the world.
Amazon Alexa is the new genie of this era. “Your wish is her command.” This AI assistant is leveraging its technical base and becoming more and more resourceful with time. Who knows, soon Alexa will become an indispensable part of our lives? It is so easy to sit back on the sofa, and just order Alexa to ‘play a song’, to redirect us to news, to narrate stories to our children or to just help us with recommendations. The list is endless but the possibilities with Alexa are infinite.
Building a Custom Amazon Alexa Skill
The growing popularity of Alexa can be easily gauged by the mushrooming growth of Alexa skills recently. Alexa has approximately 70,000 certified skills. Think of anything, some creative mind is already working to create that skill for Alexa. There are two ways to create an Amazon Alexa skill i.e. create Alexa skill with Amazon Skill Blueprints and create Alexa skill with Alexa Skill Kit (ASK). Let’s get into the details.
Create Alexa Skill with Amazon Alexa Skill Blueprints
Creating a skill for Alexa may sound like a Herculean task, and might scare the masses who suffer from ‘code-phobia’ but with the release of ‘Alexa Skill Blueprints’ creating customized skills and voice responses has become a cakewalk for all of us. We just have to start.
Amazon Alexa Skill Blueprints has become quite extensive with approximately 30,000 skills. There are a plethora of options of skills one can choose from. The different genres being as follows:
- Business and Finance
- Connected Car
- Education and Reference
- Food and Drink
- Game and Trivia
- Health and Fitness
- Home Services
- Movies & TV
- Music and Audio
- Novelty and Humour
- Smart Home
- Travel and Transportation
Also Read: Top 7 Alexa Skills
A simple framework of creating a skill using Alexa Skill Blueprints is as follows:
- Guide to making a skill
- Guide to using a skill
- ‘Inspirational’ skill
- Naming a skill
All the above four steps can be completed effortlessly within minutes, and anyone can do it. Amazon has numerous templates to aid the skill makers – like household chores list, customized games, and personalized quizzes and many more.
So, let’s get started with Amazon Skills Blueprints.
1. Sign into Amazon Blueprints: Visit www.blueprints.amazon.in and log in using your Amazon credentials.
2. Choose which kind of skill you wish to design: The different categories available to users right now are:
- Fun & Games
- Learning and Knowledge
- At Home
3. Selecting the right template: Now, under each category, one has to choose a template.
For example, if one has chosen the ‘Fun & Games’ category, then one can choose ‘Trivia’ as the template.
4. Click on ‘Make Your Own’ button: There are already a host of pre-populated questions and responses available with blueprints. One can edit these questions, or add as may be necessary. Click on the ‘Add Q & A’ button at the end of the page to add more questions to the trivia if required.
5. Click on the Next: Experience button once you are done with adding all the questions for the trivia.
Once, there, you can customize the Introduction that will be displayed when the trivia starts, personalize player greetings and the different game and winner responses.
6. Click on the Next: Name button to change the name of the trivia.
7. Click on the Next: Create Skill Button, Amazon will ask you to register for a developer’s account unless you already have one. This is mandatory in case you want to make or publish a skill.
Here, you need to click on Update Account button to proceed with the publishing of the skills. It generally takes a few minutes to publish the skill. Once, it is published it will look like the screen below:
Spot the green bar on the top of the page, indicating that the skill is published. There will be buttons available now that will enable you to edit or delete the skill you created.
You can also share your skills with your friends. To do this navigate to the ‘Skills You’ve Made’ page and choose which skill you would like to share and then share it with others by clicking on the ‘Share With Others’ in the ‘Your Skill Actions’ box.
Amazon Alexa and Google Home are the two most popular AI assistants, let’s find out which one is better: Amazon Alexa vs Google Home
Create Alexa Skill with Alexa Skill Kit (ASK)
Alexa can receive, perceive and respond to a wide variety of questions from users. Curating to-do-lists, setting alarms for the morning or providing weather forecasts are the commonly known ‘Alexa Skills.’ This basically implies that each Alexa skill is actually a functional app that is driven by voice input. Though there are numerous built-in skills for Alexa, through Alexa Skill Kit, developers get the opportunity to be as creative as possible in designing and programming new custom skills for Alexa.
The Alexa Skill Kit (ASK) consists of a pool of APIs and other tools that helps in handling the voice-interface related functions like speech recognition and text-to-speech translation. ASK is a boon to developers as it is quite user-friendly and helps them build the skills swiftly and without much delay. Now, within minutes, a personalized voice command can get transformed into an Alexa skill.
A device compatible or integrated with Alexa is the required interface between the user and the Alexa Skill which is triggered by the invocation of ‘Alexa.’ For example, “Alexa, tell me about my family” which will activate the “My Family” skill. Once activated, the user can engage with Alexa through voice requests or commands as the situation may be.
The two components of the Alexa Skill Kit are:
- Skill Interface
- Skill Service
The Skill Interface
The Skill Interface is responsible for effectively processing all voice-related inputs and mapping them correctly to the right intent in the interaction model. Intents are actions that are supposed to be done as a response to the spoken requests or commands from the user. There is at least one particular word, or a phrase or a sentence that is always used to trigger the required intent. A JSON encoded event is created by the ASK skill interface once a particular intent is detected and after this, it is handled by the Skill Service.
The Skill Service
The response to JSON encoded event is decided by ASK’s Skill Service. The action to be taken is transferred to the skill interface through another JSON encoded response. Then this response is processed effectively and finally, the response in the form of speech is sent back to the user through an Alexa compatible device like the Echo.
The prerequisite to implementing the Alexa Skill Interface is to have an account with Amazon’s Developers Services (ADS). Unless you have this you cannot develop the skill and its interaction model. (Creating an ADS account is absolutely free of charge)
Most of the times developers prefer to use Amazon Web Services (AWS) to develop the required skill. Setting up an AWS account is generally time-consuming as it involves many verification procedures. Also, there is a cost involved for setting up this account which is approximately dollar one.
Setting up a skill: My Favourite Author
Purpose: Once invoked, Alexa will list down my favorite author and ask me whose quotes I would like to hear.
Let us have a basic overview of building skill with ASK.
- Log in to Amazon Developers Services and select Alexa.
- Click or press on the ‘Start a Skill’ button.
- Click on the ‘Create Skill’ button to go to the ‘Create a New Skill Form’
- Type in the desired skill name in the ‘skill-name field’ and then choose Custom.
For example, for the skill we are planning to design we can use the name – ‘My Favourite Author’
1. Click on the button ‘Create Skill’
PART A: Development of the Interaction Model
The most integral part of building Alexa’s skill is the interaction model. It consists of the following things:
- Skill Invocation Name
We click on the “Invocations Tab” and enter the desired skill name in the “Skill Invocation Name”.
(For example, we can put “Favourite Author” in our case)
We need four types of intents generally to manage the interaction with Alexa.
- An intent to take care of the voice-request or voice-command.
- An intent to deal with voice requests that interrupts the interaction or with which the user refuses to respond
- An intent that takes care of user voice request which has no match with any utterances.
- An intent that is responsible for handling the user’s speech request for Help.
ASK has a huge library with pre-defined intents and their corresponding utterances, so mostly we just have to create just one intends to deal with the custom voice-input.
After the creation of the intents, we have to create a corresponding utterance.
Note: It is important to save and build the model to progress further.
PART B: Selecting the Endpoints
To implement the skill set, it is imperative to use a web service or AWS. Using AWS is more popular as it makes use of the AWS Lambda function.
- Click on ‘Endpoints’
- Choose the “AWS Lambda function”
The skill and the skill ID are important parameters to the AWS Lambda function when we need to connect to AWS Lambda with skill interface. The “Endpoints” section contains the skill ID.
PART C: Designing the AWS Lambda Function
It is important to build and configure the AWS function to finish skill creation. The input to the lambda function is events and it returns responses to the ‘skill interface.’ Events have the required information to deal with different kinds of requests. The different kinds of requests are:
- Launch Request – This request is embedded within the event and sent to the Lambda when the user activates the skill by calling it through its ‘invocation’ number.
- Intent Request – This too is embedded within an event and sent to the Lambda function when the user starts interacting with the skill when his voice inputs get mapped to the corresponding intent.
- SessionEndedRequest – This is sent to the Lambda function when the session ends abruptly due to an error.
There are three general cases when the session ends abruptly:
- When the user requests to ‘exit.’
- When the user does not respond even though the device is active and listening.
- When the user makes a voice request but it has no corresponding matching intent.
Testing the Built Skills
After the skill is built and is ready-to-use, we can easily test the outcome of the skill developed by testing it with an Alexa enabled device like Amazon Echo.
Thinking to purchase a smart speaker for yourself? Choose one of these Top 5 Smart Speakers and make your life easy.
Alexa has successfully infiltrated our lives. The list of commands for Alexa seems to be growing at an exponential rate. The ease with which we can customize Alexa clearly depicts that the growth and popularity curve of Alexa is a steeply rising one. A combination of synthetic imagination and creative imagination will open up such powerful skills of Alexa that we will truly appreciate the importance as well as the dominance of Artificial Intelligence in our lives.
We have to understand that skills that Alexa possess today might become redundant tomorrow. So, re-skilling Alexa is equally imperative to be in the competition with its other competitors that are known as well as those which might emerge anytime. Time will prove how the humans wake up to the call of ‘Alexa’ further.
Being an Alexa Skill Builder brings a number of opportunities but the competition is not less here. So, if you are an Alexa Skill Builder, give your recognize your skills with the Alexa Skill Builder Specialty certification and stand out from your competitors. Try our AWS Certified Alexa Skill Builder Specialty practice tests to test your preparation and become confident to pass the exam in the first attempt.
- 12 AWS Certifications – Which One Should I Choose? - January 27, 2021
- Getting Started – AWS IoT Tutorial - October 30, 2020
- List of Top AWS Machine Learning Tools - October 13, 2020
- 10 Best Practices for AWS Cost Optimization - September 21, 2020
- Introduction to Amazon Braket – AWS Quantum Computing Service - September 12, 2020