Voice User Interface Projects

Book description

Develop intelligent voice-empowered applications and Chatbots that not only understand voice commands but also respond to it

Key Features

  • Target multiple platforms by creating voice interactions for your applications
  • Explore real-world examples of how to produce smart and practical virtual assistants
  • Build a virtual assistant for cars using Android Auto in Xamarin

Book Description

From touchscreen and mouse-click, we are moving to voice- and conversation-based user interfaces. By adopting Voice User Interfaces (VUIs), you can create a more compelling and engaging experience for your users. Voice User Interface Projects teaches you how to develop voice-enabled applications for desktop, mobile, and Internet of Things (IoT) devices.

This book explains in detail VUI and its importance, basic design principles of VUI, fundamentals of conversation, and the different voice-enabled applications available in the market. You will learn how to build your first voice-enabled application by utilizing DialogFlow and Alexa's natural language processing (NLP) platform. Once you are comfortable with building voice-enabled applications, you will understand how to dynamically process and respond to the questions by using NodeJS server deployed to the cloud. You will then move on to securing NodeJS RESTful API for DialogFlow and Alexa webhooks, creating unit tests and building voice-enabled podcasts for cars. Last but not the least you will discover advanced topics such as handling sessions, creating custom intents, and extending built-in intents in order to build conversational VUIs that will help engage the users.

By the end of the book, you will have grasped a thorough knowledge of how to design and develop interactive VUIs.

What you will learn

  • Understand NLP platforms with machine learning
  • Exploit best practices and user experiences in creating VUI
  • Build voice-enabled chatbots
  • Host, secure, and test in a cloud platform
  • Create voice-enabled applications for personal digital assistant devices
  • Develop a virtual assistant for cars

Who this book is for

Voice User Interface Projects is for you if you are a software engineer who wants to develop voice-enabled applications for your personal digital assistant devices such as Amazon Echo and Google Home, along with your car's virtual assistant systems. Some experience with JavaScript is required.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Voice User Interface Projects
  3. Dedication
  4. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  7. Introduction
    1. Technological advancement of VUIs
      1. First-generation VUIs
      2. Boom of VUIs
        1. History of VUIs on mobile devices
        2. History of VUIs for Google Home
        3. History of VUIs in cars
    2. Basic design fundamentals of VUIs
      1. What are VUIs and why are they important?
      2. Role of NLP in VUIs
      3. VUI design platforms
      4. Principles of conversation
        1. Turn taking
        2. Flow
        3. Context
        4. Verbal confirmation
        5. Visual confirmation
        6. Error handling
        7. Session awareness
        8. Providing help
        9. Response time
        10. Empathy
    3. Voice-enabled applications
      1. Home assistant devices
      2. Automobile virtual assistant devices
      3. Chatbots
    4. Future of VUIs
    5. Summary
  8. Building an FAQs Chatbot
    1. Why an FAQs chatbot?
    2. Introduction to Dialogflow
      1. Setting up a Dialogflow account
      2. Creating your first agent
    3. About an FAQs chatbot
      1. What are intents?
        1. Creating your first intent
      2. What are entities?
        1. Using entities
        2. Using JSON to create entities
      3. About action
      4. What is context?
        1. Creating your first context
        2. No context
        3. Testing context and no context scenarios
    4. What is Google Assistant?
      1. Installing Google Assistant on iPhone and Android
      2. Configuring Google Assistant on Android and iPhone
      3. Deploying FaqChatBot to Google Assistant
        1. Configuring FaqChatBot
    5. Machine learning in Dialogflow
      1. Machine learning classification threshold
      2. Training data
    6. Summary
  9. Building a Fortune Cookie Application
    1. About the Fortune Cookie project
    2. About webhook
      1. Installing Visual Studio Code
      2. Setting up an agent
      3. Checking security and the service account
      4. Enabling webhook
        1. Deploying and testing webhook
    3. Working with logs
    4. Building Fortune Cookie VUIs
      1. Building a Get Quote intent
        1. Handling the Get Quote intent from the Webhook
      2. Building a Get Quote based on the user feelings
        1. Building a Feeling entity
        2. Building events to get Feeling-based quotes
        3. Building a Custom Welcome intent
        4. Building a get feeling custom follow-up intent
        5. Writing code for a feeling custom follow-up intent
      3. Building a Get Fortune Cookie by an author
        1. Building an Author entity
        2. About rich response
          1. Creating a text response
          2. Creating an image response
          3. Creating quick replies
          4. Creating a card response
          5. Creating a listSelect response
        3. Building a Get Authors intent
          1. Building a listSelect response in code
        4. Building a Get Author Quote intent
          1. Building a Get Author Quote intent's webhook
    5. SSML and audio integration
      1. Integrating SSML and audio to Default Welcome intent
      2. Testing the default welcome intent SSML and audio sound
    6. Using Analytics
    7. Summary
  10. Hosting, Securing, and Testing Fortune Cookie in the Cloud
    1. What is the Microsoft Azure cloud platform?
      1. Fortune Cookie architectural topology in Microsoft Azure
    2. Deploying a Fortune Cookie webhook to Microsoft Azure
      1. Updating Fortune Cookie's Node.js webhook code
      2. Testing a webhook locally
      3. Creating a web.config to run Node.js in Microsoft Azure
      4. Creating Microsoft Azure App Service to host a Node.js webhook
      5. Configuring Dialogflow webhook
    3. Securing the Node.js webhook for Dialogflow
    4. Storing Quotes in Cosmos DB
      1. Creating Cosmos DB
      2. Importing the Fortune Cookie quotes
      3. Updating the Node.js webhook to use Cosmos DB
      4. Installing a new component on Microsoft Node.js
    5. Managing the Microsoft Azure Node.js service
      1. Creating a backup of the service
      2. Scaling up or scaling out
    6. Managing Cosmos DB
      1. Scaling out Cosmos DB
      2. Geo-replicating Cosmos DB
    7. Creating end-to-end tests using the Dialogflow client SDK
      1. Setting up the Dialogflow client SDK
      2. Enabling the Dialogflow API for Fortune Cookie
      3. Creating a test script using the Dialogflow client SDK
    8. Summary
  11. Deploying the Fortune Cookie App for Google Home
    1. Setting up Google Home for the first time
    2. Learning about Google Home's features
      1. Adding a home control device to Google Home
    3. Deploying Fortune Cookie to Google Home
    4. Certifying an application for the marketplace
      1. Learning about general guidelines
    5. Summary
  12. Building a Cooking Application Using Alexa
    1. Introducing the ASK
    2. Building a Henry's Kitchen Alexa skill
      1. Setting up the ASK development environment
      2. Creating an Alexa skill
      3. Creating wake up words
      4. Building slots
      5. Building intents
      6. Building utterances
    3. Creating a web service endpoint to handle skill requests
    4. Deploying and debugging the web service endpoint
      1. Configuring and testing the endpoint in the Alexa console
      2. Debugging the endpoint locally
    5. Working with Amazon Echo
      1. Setting up and testing in Amazon Echo
      2. Viewing history in Amazon Echo
    6. Backing up the Alexa skill
    7. Summary
  13. Using Advanced Alexa Features for the Cooking App
    1. Logging application events and data
      1. Setting up an Azure Blob storage
      2. Setting up application logging in the cooking application
    2. About dialog interfaces
      1. Building GetCookingIntent dialog models
      2. Handling the GetCookingIntent dialog model in code
      3. Deploying and testing the GetCookingIntent dialog model
    3. Working with built-in Intents
    4. About dialog states
      1. Coding the state management
    5. Submitting cooking app to Amazon marketplace
    6. Summary
  14. Migrating the Alexa Cooking Application to Google Home
    1. Comparing an Alexa Skills Kit and Dialogflow agent
      1. Comparing an Alexa Skill to a Dialogflow agent
      2. Comparing intent
      3. Comparing slots to entities
    2. Converting the Henry's Kitchen Alexa Skill to Dialogflow
      1. Creating the agent
      2. Converting slots to entities
      3. Converting Alexa intents to Dialogflow intents
      4. Enabling a webhook
    3. Creating a webhook to handle Dialogflow
      1. What code is reused?
      2. Setting up a Dialogflow router
      3. Setting up a Dialogflow webhook entry point
      4. Refactoring the BuildGetCookingInstruction function
      5. Refactoring the GetOffset function
      6. Deploying and testing Henry's Kitchen
    4. Summary
  15. Building a Voice-Enabled Podcast for the Car
    1. Learning about Xamarin
    2. Setting up the development environment
    3. Creating a new Xamarin project
    4. Setting up the Xamarin project for Android Auto
      1. Building Android Auto MyPodCast
      2. Building MusicService
        1. Implementing MusicService (Android MediaBrowserService)
        2. Implementing MusicPlayer
      3. Building MusicProvider
      4. Building an Android Media Player UI
    5. Testing Using Android Phone
    6. Summary
  16. Hosting and Enhancing the Android Auto Podcast
    1. Enhancing a MusicProvider
      1. Creating a Node.js backend server
      2. Creating and adding the podcasts to the Microsoft Azure blob storage
      3. Refactoring the GetSource() method in MusicProvider
    2. Testing Android Auto using the Desktop-Header unit
    3. Testing the Podcast's Application in the Car
    4. Basic Voice Commands
    5. Certifying Android Auto
    6. Summary
  17. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Voice User Interface Projects
  • Author(s): Henry Lee
  • Release date: July 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788473354