O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Voice-Enabled Apps with Alexa

Book Description

This book demonstrates the core concepts behind conversational UI and building voice-enabled apps with the Alexa framework (the examples in this book are easy to understand, but having some experience with Node.js and web development is helpful). The book focuses on a general understanding of why voice-enabled apps are important, along with easy-to-understand examples for building your first apps for the Amazon Echo. By the end of the book you will understand the importance of conversational UI, how to build and test your first Alexa app for the Echo, and how to publish your software to the Alexa app store for the world to see.

Table of Contents

  1. Preface
    1. What are voice-enabled apps?
  2. 1. Introduction
    1. Fundamentals of Conversational UI
    2. Then and Now: A Brief History of Conversational UI
      1. Internet Relay Chat
      2. Eliza
      3. Case-Based Reasoning
      4. Turing Test Contestants
      5. The Loebner Prize
      6. Artificial Intelligence Markup Language (AIML)
      7. Something Bigger Than Chatbots
      8. Like the Dinosaurs
    3. Why Control Computers with Speech?
      1. Why Conversational UI?
      2. Mobile
      3. Medium
      4. Microservices
      5. Advances in Artificial Intelligence
    4. Summary
  3. 2. Alexa Overview
    1. Your First Amazon Alexa App
      1. Hello World
      2. Create a package.json
      3. How to get it up and running
      4. Running with alexa-app-server
      5. Testing “Hello” in the Web Browser
      6. Running as a chatbot
      7. Adding a Launch Method
      8. Keeping a Session Alive
    2. You’ve Got Skills!
      1. Skills Live in the Cloud
    3. What’s in an Intent?
    4. Say What? All About Utterances
      1. Multiple Options
      2. What is, What’s: Multiple Versions of Static Text
      3. Number Ranges
      4. Optional Words
      5. Dictionaries
      6. Off to the Casino: Slots
    5. Putting It All Together: Dragon Hunt!
      1. Utterances for Dragon Hunt
      2. Running Dragon Hunt on alexa-app-server
      3. Initializing Dragon Hunt and Finding a Weapon
      4. Attacking the Dragon
      5. Running Dragon Hunt on the Command-Line
    6. Summary
  4. 3. Developing and Deploying a Skill
    1. An Alexa App About Books
    2. Setting Up Our Alexa App
    3. The getBook Intent
      1. Slots
      2. Variable Names and Types
      3. Utterances
      4. Actions
      5. Calling an External Web Service API
      6. Don’t Stuff the Session
      7. Retrieving a Book
      8. Managing the Conversation
      9. The Topic at Hand
      10. What Were We Talking About Again?
      11. Three Levels of Conversation
      12. Be Careful With Handling Session Variables
      13. Keeping the Session (and Conversation) Alive
    4. The getRating Intent
    5. The getAuthor Intent
    6. Don’t Forget About Your Session
      1. Avoiding Black Hole Skills
      2. Ending the Session at the Right Time
    7. Making Your Life Easier With Built-in Intents
      1. Implementing a Built-in Intent
      2. CancelIntent
      3. HelpIntent
      4. StopIntent
      5. StartOverIntent
      6. Extending Built-in Intents
    8. Reprompting
      1. Hello? Can You Hear Me Now?
      2. Guide the User on a Clear Path
    9. Download Example Code
    10. Announcing Your Skill to the World
      1. How Your Skill Sees the World
      2. Hosting Your Skill as a Web Service Endpoint
      3. Deploying to the Cloud
    11. Deploying to the Amazon Alexa Service
      1. Adding a New Skill on Amazon
      2. Skill Information
      3. Interaction Model
      4. Configuration
      5. SSL Certificate
    12. Testing
      1. Three Types of Voice-Enabled Testing
    13. Testing on an Echo Simulator
      1. Testing Your Skill on Echosim.io
    14. Honor Your Application Id
      1. Validating the Application Id
      2. Our Skill Appears To Be Broken
      3. Configuring Your Application Id
      4. Validating Application Ids in Multiple Skills
    15. Don’t Forget to Turn Off Debug Mode
    16. Summary
  5. 4. Submitting, Certifying, and Monetizing
    1. Testing on a Real Echo
      1. Your Amazon Developer Account and You
      2. Adding an Echo to Your Amazon Alexa Account
    2. Publishing Information Overview
      1. Category
      2. Testing Instructions
      3. Description
      4. Example Phrases
      5. Keywords
      6. Images and Icons
      7. Previewing your Skill in the Alexa App
    3. Privacy and Compliance
    4. Submitting the Skill for Certification
    5. Amazon Policy Guidelines
      1. Trademarks, Intellectual Property, and Privacy
      2. Children Under the Age of 13
      3. Healthcare
      4. Payments
      5. Advertising
      6. Adult-Related Content and Violence
      7. Religion and Culture
      8. Emergency Services and 911
      9. Content
    6. Security Requirements
    7. Hosting a Skill on Amazon AWS Lambda
      1. Reasons to Choose AWS Lambda
      2. AWS Lambda Setup
      3. Configuring Your Skill on Lambda
      4. Testing Your Skill on Lambda
      5. Troubleshooting Problems
    8. Hosting a Skill on Your Own Web Server
      1. Requirements for Hosting on Your Own Web Server
      2. Using an Amazon-Approved Certificate Authority
      3. Verifying Incoming Requests
      4. Checking the Alexa Signature
    9. Identifying Users in Your Skill
      1. Account Linking
      2. Implementing Account Linking
      3. Requirements for Account Linking
    10. Skills that Allow Unlocking or Disarming
      1. Policy, Privacy, Security, Oh My!
    11. Functional Tests
      1. Testing Example Phrases for a Skill
      2. Reviewing the Description and Details
      3. Home Cards
      4. Account Linking
    12. Watch Out for Duplicate Skills
    13. Voice Interface and User Experience Tests
      1. Main Goals of Voice Interface Testing
      2. Overall Voice Interface Testing Goals
    14. Monetizing a Voice-Based App
      1. Methods for Making Money
      2. Brand Recognition
      3. Advertising
      4. Premium Apps
      5. In-App Purchases
      6. Association with a Product or Service
      7. Referral Commissions
      8. Get Creative
    15. Summary
  6. 5. The Future
    1. What Conversational UI Can and Cannot Do
    2. Return to Case-Based Reasoning
    3. Taking the Conversation to the Next Level
    4. Getting Smarter About Conversation
    5. Introduction to Natural Language Processing
      1. A Brief Primer on Natural Language Processing
      2. Bag of Words Model
      3. Creating a Dictionary
      4. Digitize Text
      5. Classifying Documents as “Eating”
      6. Predicting on New Data
      7. Applying Classification to Voice-Based Apps
    6. Is Machine Learning Really That Complicated?
      1. IBM Watson
      2. Amazon Machine Learning API
      3. Google Prediction API
      4. Microsoft Azure Machine Learning API
      5. So Many Machine Learning Services, Oh My!
    7. Shopping by Voice
    8. The Amazon Product Advertising API
      1. An Example of Shopping by Voice
      2. The Intent Schema
      3. Utterances
      4. Registration and Setup
      5. Implementing the API
      6. Searching for Products
      7. Using a Remote Shopping Cart
      8. Placing an Order from a Voice-Based App - Not Quite Yet
    9. Using Emotion in Conversational UI
      1. A Weather App With Emotion
      2. Designing Emotional Software
      3. Implementing Software Emotion
      4. An Example of Software Emotion: Music Player 1.0
      5. An Example of Software Emotion: Music Player 2.0
      6. Conversational UI State Transition
      7. Sentiment Analysis
      8. An Example of Software Emotion: Book Reviews 1.0
      9. An Example of Software Emotion: Book Reviews 2.0
      10. The Effect or Emotional Artificial Intelligence in Voice-Based Apps
      11. Implementing Multiple Emotional Responses
      12. Taking Emotional Artificial Intelligence Further
      13. Moving into the Realm of “Not-So” Science Fiction
    10. 3D Holograms
      1. Virtual, Augmented, and Mixed Realities
      2. Holographic Messages
      3. The Real Princess Leia
      4. From Voice-Based Apps to Holographic-Based Apps
      5. Holograms Interacting With Humans
      6. Examples of Holographic Computing
      7. Software With a Physical Holographic Presence
    11. Controlling Cars by Voice
      1. From Cruise-Control to Self-Driving
      2. Car, Can You Hear Me Now?
    12. Controlling Your Home by Voice
      1. Home Automation and the Internet of Things
      2. Home Automation With Amazon Echo
      3. Amazon Echo and IFTTT
      4. Voice-Enabled Usage Reports
      5. Security Considerations
    13. A Chatbot With Personality
      1. Insight From Twitter
      2. Analyzing Your Tweet History
      3. Personality Insight
      4. Artificial Intelligence That Knows You Better Than Anyone
    14. Summary
    15. Conclusion