Introduction
In this tutorial, we will be taking a quick look at Amazon Alexa Skills. So, let us get started with the most common question – What Is Amazon Alexa?
Alexa is nothing but a cloud-based voice service provided by the tech giant Amazon. In today’s world, millions of devices use Alexa as their voice service. It’s a very efficient tool to interact with the technology that we use in our day-to-day lives. As a result, it is capable of playing music, setting alarms, providing real-time weather updates and the latest news, etc. Alexa has two major parts – Alexa Voice Service and Alexa Skills Kit.
Alexa Voice Service
This tool focuses on making the voice service compatible with people from different backgrounds. It incorporates various languages for providing language and region-specific services. This allows customers to interact in their local languages and makes its usage convenient.
The interesting thing about this service is that it can be used on any device with the help of a Wi-Fi chip and a microphone. As a result, third-party devices can also become Alexa-enabled.
Alexa Skills Kit
So now, let’s start with this interesting feature of Alexa. Alexa Skills Kit is a tool provided to developers that enables them to create their own Alexa features called Alexa Skills. Skills are basically abilities given to Alexa by developers to do certain things. Next, let us look at how to open an Alexa Skill as well as the different parts of a command.
Opening an Alexa Skill
As shown in the picture above, there are several parts to an Alexa command. Let’s look at each part in detail.
Wake word: We activate the device by using a wake word. In this case, it’s the word, Alexa. It serves as a cue for the voice service to start listening to the speaker. In simple words, the wake word lets the tool know that the user is speaking to it.
Launch: It’s the term that we use to open a skill. In the above example, we have launched the skill using the term ask. Also, we can use other terms such as open, start, play, tell, etc too to launch the skill.
Invocation name: It is a name that developers give to their skills so that users can access the specific skill. It can consist of multiple words. It can also be a common term. In case multiple skills have similar invocation names, Alexa will provide the user with the choice to select the desired skill.
Accessing the functionality of an Alexa Skill
Utterance: Most of the time, we open a skill to perform a specific function. In order to access this functionality, we use utterance. In the example above, “on a fact about herbivores” is the part of the command which is the utterance. As a result, Alexa accesses the fact functionality of our skill by mapping this utterance to an intent.
Intent: Intents are the parts that determine a specific functionality. Developers need to only focus on the intent to provide specific functionality to their skills. Let us assume that the intent that supports the “fact” functionality is named as GetFacts intent. So now, when we use utterances such as “on a fact about herbivores” or similar sentences (“say a fact”, “give me a fact” etc), Alexa maps these utterances to the GetFacts intent and accesses the fact functionality of our skill.
Slot: In case of some intents, just accessing the intents won’t be enough. In the above example, we are asking for a fact on herbivores. Here, we are specifying a category. There could be other slots such as carnivores, omnivores, etc. This is called a slot. By using slots, we will be able to specify the category within the functionality.
Built-in Intents
Alexa provides us with some built-in intents which take care of basic user commands. Some of these built-in intents are mandatory to pass the certification process of the Alexa Skill. These intents are pre-trained on a lot of basic utterances so that the developer doesn’t have to input every single possible sentence. So, let’s now look at some of the common built-in intents
AMAZON.CancelIntent: This intent maps to canceling actions. Some of the common utterances used are “cancel”, “cancel this”, “cancel that”, etc.
AMAZON.HelpIntent: This intent maps to actions that provide help. The common utterances include “help”, “help me out”, “help me with”, “I need help”, etc.
AMAZON.StopIntent: This intent maps to stopping actions. Some of the common utterances are “stop”, “stop it”, “stop that”, etc.
AMAZON.RepeatIntent: This intent maps to repeating actions. The common utterances used are “repeat”, “repeat that”, “say that again”, etc.
Conclusion
So, in this tutorial, we have gone through Alexa Skills and basic terms related to a skill. Hope that it was informative as well as enjoyable. To know more about Alexa, you can visit the official site by clicking here. To learn about how to create an account in Amazon Developer Interface, click here.
Happy Learning!