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

Designing the CryptoOracle skill


Now that we know what cryptocurrencies are and why are they are getting all the attention lately, we can design the CryptoOracle skill.

CryptoOracle will work via the following steps:

  1. A user launches the skill:

Figure 5.1: Launching the CryptoOracle skill

The launch response is fetched from the Lambda and played to the user, as shown in the preceding diagram.

  1. A user asks Alexa about the price of any cryptocurrency:

Figure 5.2: Querying the cryptocurrency price via the CryptoOracle skill

This request will do in the following:

    • Launch an intent to fetch the price with the cryptocurrency name as a parameter
    • The Lambda receives the intent and extracts the cryptocurrency name
    • The Lambda fetches the cryptocurrency price via the coinmarketcap API using the currency name

Note

To know more about the coinmarketcap API, navigate to https://coinmarketcap.com/.

Finally, the response from the Lambda, which contains the cryptocurrency price, is played to the user.

  1. Optionally, the user...