Reader small image

You're reading from  Alexa Skills Projects

Product typeBook
Published inJun 2018
PublisherPackt
ISBN-139781788997256
Edition1st Edition
Right arrow
Author (1)
Madhur Bhargava
Madhur Bhargava
author image
Madhur Bhargava

Madhur Bhargava is specialized in Wireless and Mobile Computing from CDAC ACTS Pune, India. He started his career at Electronic Arts as a software engineer working on mobile games. He later addressed problems in personalized healthcare, leveraging the power of mobile and voice computing. He is proficient in various mobile/embedded technologies and strives to be a software generalist. He believes that good software is a result of talented individuals working together as a communicative team in an Agile manner. He likes to spend time with his family, read, and watch movies.
Read more about Madhur Bhargava

Right arrow

Chapter 2. Hello World, Alexa!

"The human voice is the organ of the soul."

                                   – Henry Wadsworth Longfellow

In the previous chapter, we discussed the evolution of various voice-based personal assistants, discussed the capabilities of each of those, and finally compared two significant smart home-based personal assistants, namely Alexa and Google Home.

In this chapter, we will focus on Alexa. We will first learn about Amazon Echo, the smart speaker from Amazon, which enables a user to interact with Alexa and its various flavors. Later on, we will move on to learn about the anatomy of Alexa and what goes into making Alexa so interactive. We will do so by covering the following topics:

  • An Introduction to Amazon Echo
  • Anatomy of an Alexa Skill
  • Building a Hello World Alexa Skill

We will start by introducing Amazon Echo, then move on to the finer details of Alexa and Alexa Skills.

An Introduction to Amazon Echo


Often, the term Amazon Echo is used synonymously with Alexa. However, although both are interrelated, they point to very different things—Amazon Echo is the actual smart speaker (hardware), which is a gateway to Amazon's Alexa Skills service via an interactive voice-based personal assistant.

Amazon Echo has a whole device family and hence comes in many flavors, all of which are discussed in the following sections.

Amazon Echo – First Generation

Amazon Echo was the original first generation flagship smart speaker from Amazon. It requires a wireless internet connection to work as its voice capability (Alexa) is based on a cloud computing service by Amazon:

Figure 2.1: A first generation Amazon Echo

The initial setup of Amazon Echo can be done via the Alexa mobile app, available for both of the major mobile platforms (iOS and Android) and can also be done via the Alexa web portal.

To enable it to reach users of varied economic capacities, Amazon has introduced Amazon...

Anatomy of an Alexa Skill


In this section, we will strive to understand what makes Alexa, the personal assistant bundled with Amazon Echo, so smart. The sole reason that Alexa can follow and understand a user's voice commands is because it has skills, and not just in a literal sense, but also in an actual sense.

An Alexa Skill is an actual piece of software code designed for a singular purpose; that is, to make Alexa accomplish a certain task. The following are some examples:

  • There is an Alexa Skill to order pizza from Domino's Pizza
  • There is an Alexa Skill to summon Uber
  • There is an Alexa Skill to order flowers
  • There is an Alexa Skill to listen to your horoscope

The number of skills available for Alexa has been steadily growing since 2016. As of early 2018, there are over 30,000 third-party skills available for Alexa in the US alone:

Figure 2.6: Growth statistics for Alexa's third-party skills

Once the user has configured the Amazon Echo device, as shown in the previous section, installing/enabling...

Hello Alexa – Building a Hello World Alexa Skill


This section addresses the final goal of this chapter, that is, actually writing our first Alexa Skill. However, please note that we do have a few prerequisites before we embark on the final leg of our journey through this chapter. For the success of this exercise, each user will need to have an Amazon Developer account. Signing up for an Amazon Developer account is a simple and straightforward process. The user can sign up for an account at https://developer.amazon.com.

Signing up is a three-step process and includes providing personal information, accepting terms of service, and providing a payment method.

Note

Please note that although signing up requires you to provide Amazon with a payment method, Amazon will charge you if, and only if, you end up using any of the paid services. However, over the course of this book, we will be restricting our usage to free tier and will not be using any of the paid services.

Signing up for an Amazon Developer...

Summary


Please give yourself a pat on the back if you made it this far, having created the Hello World Greeter skill. Successful completion of this exercise proves that you just leveled up from being a novice to a Padawan. We still have a lot of skills to design before you can formally call yourself an Alexa Skills Jedi but we are off to a good start.

We hope that you now understand the anatomy of a basic Alexa Skill and the jargon surrounding it, such as Lambdas, intents, and slots. Also, you should now be able to design simple skills yourself.

In the coming chapters, we will gradually move on to slightly more complicated skills, each with an increasing level of difficulty as we proceed through each of the chapters. For example, in the next chapter, we will create an Alexa Skill that will enable us to use Alexa as a messaging medium, and from there we will move on to design other complex voice interfaces and skills, such as trivia games and smart home skills.

The future is voice!

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Alexa Skills Projects
Published in: Jun 2018Publisher: PacktISBN-13: 9781788997256
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Madhur Bhargava

Madhur Bhargava is specialized in Wireless and Mobile Computing from CDAC ACTS Pune, India. He started his career at Electronic Arts as a software engineer working on mobile games. He later addressed problems in personalized healthcare, leveraging the power of mobile and voice computing. He is proficient in various mobile/embedded technologies and strives to be a software generalist. He believes that good software is a result of talented individuals working together as a communicative team in an Agile manner. He likes to spend time with his family, read, and watch movies.
Read more about Madhur Bhargava