Book Image

Alexa Skills Projects

By : Madhur Bhargava
Book Image

Alexa Skills Projects

By: Madhur Bhargava

Overview of this book

Amazon Echo is a smart speaker developed by Amazon, which connects to Amazon’s Alexa Voice Service and is entirely controlled by voice commands. Amazon Echo is currently being used for a variety of purposes such as home automation, asking generic queries, and even ordering a cab or pizza. Alexa Skills Projects starts with a basic introduction to Amazon Alexa and Echo. You will then deep dive into Alexa Programming concepts such as Intents, Slots, Lambdas and maintaining your skill’s state using DynamoDB. You will get a clear understanding of how some of the most popular Alexa Skills work, and gain experience of working with real-world Amazon Echo applications. In the concluding chapters, you will explore the future of voice-enabled applications and their coverage with respect to the Internet of Things. By the end of the book, you will have learned to design Alexa Skills for specific purposes and interact with Amazon Echo to execute these skills.
Table of Contents (14 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

The Need for Voice-Based Personal Assistants


To understand the evolution of voice-based personal assistants, we will have to go back in time and see some of the important events that led to their advent. One of these many events was the evolution of computers. Although not directly related to the voice revolution, the evolution of computers played a key role in the evolution of voice-based personal assistants because it marked the invention of the internet, which is the backbone of most voice-based personal assistants. The computer revolution also introduced critical changes concerning hardware and integrated circuits, which we shall discuss next.

The computer revolution began in the 19th century when Charles Babbage invented the first analytical engine, which earned him the nickname the Father of Computers. The 1950s and 1960s were interesting times, which introduced some tremendous advances in the field of computer science with a groundbreaking invention, integrated circuits. Integrated circuits replaced diodes and vacuum tubes, which led to tremendous form factor changes in existing computers, in turn leading to smaller, more compact sizes. It was also the time when Gordon Moore introduced his famous observation that the number of transistors in an integrated circuit doubles every two years; roughly speaking, we would be able to pack more and more processing power into an integrated circuit while the size of the circuit would shrink every two years. Moore's observation already foresaw the future of our technology and hardware, and by following it we could have easily predicted at least one thing, that we would be seeing our computers getting smaller, a lot smaller, and voilà, today nearly everyone has a small computer in his/her hands, their smartphone.

The late '60s and early '70s also saw the advent of the Advanced Research Projects Agency Network (ARPANET), which eventually evolved to become the internet as we came to know it in the '80s. All this sounds trivial at first, before you realize that all these were the key factors that, had they not been invented, we would have never seen voice-based personal assistants in action.

Prior to voice-based personal assistants, the traditional way of sending commands to a computer system was either through the GUI using a mouse or through the terminal using a keyboard. As the form factor of traditional computing systems reduced, the input methods evolved too and initial handheld devices/mobile phones introduced a stylus in addition to the traditional keyboard to leverage the touchscreen capabilities of the device:

Figure 1.1: A smartphone with a stylus, captured in the year 2010

The evolution continued and the place of the stylus was taken by, as pointed out by Steve Jobs,"the best pointing device in the world," our fingers.

Note

Steve Jobs introduced touch on the iPhone by using the term "best pointing device in the world" for a user's fingers in 2007 during the MacWorld Conference in San Francisco. The highlights of this conference are available on YouTube at https://www.youtube.com/watch?v=P-a_R6ewrmM.

As the interface between computers and humans grew thinner, it was only natural that voice was the next medium that could act as an input tool to computing devices, and hence there has been the advent of voice-based personal assistants.

Note

The idea of having voice as an input medium for computing devices was not new; parallel to the computer revolution, there was also the voice revolution, many important discoveries of which are shown in the link: https://voicebot.ai/2017/07/14/timeline-voice-assistants-short-history-voice-revolution/

Of the many milestones of the voice revolution, almost every reader will be familiar with at least a few of the latest ones, namely Siri, Google Now, Cortana, and Amazon's Alexa. The most popular ones are Apple's Siri and Google's Google Now, which initially appeared integrated with iOS and Android mobile devices, respectively.

Apple's Siri initially appeared as an app on Apple's App Store, but was later acquired by Apple and became much more closely integrated with iOS devices. Siri uses a natural language interface to listen to commands from the user and perform the necessary actions. Also, with the coming of macOS Sierra, its capabilities were no longer limited to iOS devices:

Figure 1.3: The capabilities of Siri also extend to desktops in addition to iPhones

Google closely followed in the footsteps of Apple and, shortly after the introduction of Siri in 2011, introduced Google Now in 2012. Unlike Siri, Google Now was available natively for Android and also as a separate app for iOS devices. Google Now seamlessly integrated with other Android/Google features such as Gmail, Google Calendar, and the mighty Google Search itself:

Figure 1.4: Google Now is available on iOS as part of a native app (Google and the Google logo are registered trademarks of Google Inc., used with permission.)

Closely behind Google was Microsoft with its own intelligent voice-based assistant, Cortana, which it introduced in 2014 for desktop and mobile devices:

Figure 1.5: Microsoft's Cortana was initially introduced for Microsoft's mobile and desktop computing systems 

As time passed, it became evident that voice-based personal assistants were here to stay and needed exclusive hardware and space of their own. This was something that Amazon took the lead on with the introduction of its brand Amazon Echo, which was a device family of smart speakers, specifically designed and developed by Amazon Inc. to enable its users touse the services of an interactive voice-based personal assistant called Alexa (hence the title of the chapter):

Figure 1.6: The Amazon Echo device family

The complete Echo family and their functionalities are described in the following table:

Device

Use

Amazon Echo

Original flagship smart speaker.

Echo Dot

Smaller and cheaper version of Echo without the amplified speaker, so the sound quality is also inferior to Echo.

Echo Plus

Latest version of Echo with Zigbee integration.

Echo Show

Alexa-enabled device with a large touchscreen so that a user's interaction with Alexa is not just auditory but also visual.

Echo Spot

Show+Dot=Spot. All the basic functionality of Show and Dot devices with the much lesser form factor.

Amazon Tap

Alexa-enabled Bluetooth speaker.

The Echo family marked Amazon's second foray into the hardware domain, the first being its introduction of the popular ebook reader, Kindle. Google also recognized the fact that interactive voice assistants can do much more by specifically leveraging the smart home concept and closely followed behind Amazon with its Google Home Smart Speaker, which contained Google Assistant as Alexa's counterpart:

Figure 1.7: Launch timeline for various voice-based personal assistants (source: www.citiusminds.com)

Please note that the preceding diagram does not include Google Now, which was introduced in 2012.

We have discussed the evolution of voice-based interactive personal assistants and how they developed from just another app on the user's smartphone to the user's smart home.

In the next section, we shall discuss some of the popular uses of voice-based interactive personal assistants.