Mastering Voice Interface 9781484270059


287 26 15MB

English Pages [702] Year 2021

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Table of Contents
About the Authors
About the Technical Reviewers
Acknowledgments
Introduction
Part I: Conversational Voice System Foundations
Chapter 1: Say Hello to Voice Systems
Voice-First, Voice-Only, and Conversational Everything
Claims About Voice Technology
Claim: Everyone Has a Smart Voice Device and Uses It All the Time
Claim: You Can Simply “Add Voice” to an Existing GUI or Touch Interface
Claim: Voice or Chatbot, Both Are Conversational So Basically the Same
Claim: I Speak the Language; What More Is There to VUI Design?
Claim: Every Voice Solution Needs a Strong Personality
Claim: Hire a Scriptwriter; They Can Write Conversations
Claim: Recognition Is a Solved Problem; It’s Basically Perfect Today
Claim: AI Takes Care of Understanding What People Say
Claim: IVRs Are Irrelevant Today, Nothing to Be Learned from Them
Claim: That Ship Has Sailed; Alexa Is the Winner
Claim: Everyone Needs a Voice Solution; Voice Is Great for Everything
Introduction to Voice Technology Components
Speech-to-Text
In-Depth: Is STT Better Than Human Recognition and Understanding?
Natural Language Understanding
Dialog Management
Natural Language Generation
Text-to-Speech
In-Depth: TTS Synthesis—Is It Like Human Speech?
The House That Voice Built: The Phases of Voice Development Success
Plan
Design
Build
Test
Deploy and Assess
Iterate
What Next?
Summary
Chapter 2: Keeping Voice in Mind
Why Voice Is Different
Hands-On: A Precoding Thought Experiment
Voice Dialog and Its Participants
The Human: Spoken Natural Language
The Computer: Voice Recognition and Interpretation
Human-Computer Voice Dialog
What’s Next?
Summary
Chapter 3: Running a Voice App—and Noticing Issues
Hands-On: Preparing the Restaurant Finder
Choosing Voice Platforms
Hands-On: Implementing the Restaurant Finder
Basic Setup
Step 1: Respond to an Invocation
Step 2: Specify What the User Says
Step 3: Specify What the VUI Says
Step 4: Connect Dialogflow to Actions on Google
Step 5: Test Your VUI
Testing Using Dialogflow
Testing Using the Actions console
Testing with Assistant, Home, or Nest Devices
Step 6: Save, Export, or Import Your Work
Why We’re Using Actions on Google and Assistant
Google’s Voice Development Ecosystem
Actions on Google
Dialogflow
The Pros and Cons of Relying on Tools
Hands-On: Making Changes
Adding More Phrases with the Same Meaning
Pushing the Limits
Rejection
Fixing Rejection
Expanding Information Coverage
Adding Granularity
Preview: Static vs. Dynamic Responses
What’s Next?
Summary
Part II: The Planning Phase: Requirements Discovery and High-Level Design Definition
Chapter 4: Define Through Discovery: Building What, How, and Why for Whom
General Functionality: What Are You Building?
User Needs: Who’ll Use It and What Do They Want?
Demographics and Characteristics
Engagement Patterns
Mental Models and Domain Knowledge
Environment and State of Mind
From General to Detailed Functionality
Step 1: Define the Core Features
Step 2: From Features to Intents and Slots
Step 3: Identify Potential Complications
Business Requirements: Why Are You Building It?
General Purpose and Goal
Primary and Secondary Goals
Success Metrics
Domain, Device, and Other Modalities
Underlying Service and Existing Automation
Branding and Terminology
Prompt Format: Text-to-Speech or Recordings
Terminology and Pronunciation
Data Needs
Access and Availability
Privacy and Security Concerns
Access Limitations Based on Time or Place
Special Announcements
Legal and Business Constraints
Compliance
Identification and Authentication
Error Handling and Navigation Behaviors
System Requirements: How Will You Build It?
Recognizer, Parser, and Interpreter
External Data Sources
Data Storage and Data Access
Other System Concerns
What’s Next?
Summary
Chapter 5: From Discovery to UX and UI: Tools of Voice Design
Where to Find Early User Data on Any Budget
Online Research and Crowdsourcing Options
Blogs and Articles
Industry Studies
Customer Reviews
Supporting Materials
Crowdsourced Data
Dialog Participant Observation
Actual or Potential Primary User Observation
Secondary Dialog Participant Observation
Expert Reviews and Heuristic Evaluation
Focus Groups, Interviews, and Surveys
In-Depth Interviews and Focus Groups
Subject Expert Panel
Targeted Surveys
In-App Data Collection
How Discovery Informs VUI Design Decisions
Discovery Informing Design: An Example
Dialog Manager Graph, Yes; Hierarchical Decision Tree, No
Capturing and Documenting VUI Design
Dialog Flows
Sample Dialogs
Detailed Design Specifications
VUI Design Documentation Approaches
Self-Contained Design Tools
Open Platform-Specific Tools
Proprietary or Closed Platform-Specific Tools
Standard Documentation Tools
Prototyping and Testing Your Assumptions
Voice UX and Prototyping Approaches
Hallway “Guerilla” Studies
Low-Fidelity Mockups (Voice Version of “Wireframes”)
Wizard of Oz (“WOZ”)
Functional Prototypes
What’s Next?
Summary
Part III: The Building Phase: Design-Informed Development
Chapter 6: Applying Human “Rules of Dialog” to Reach Conversation Resolution
Dialog Acts, Games, and Turns—and Grice
In-Depth: Reaching the End of a Dialog Through Grice’s Cooperative Principle
Question Answering
Building Out the Question Answering Example
In-Depth: Entities, Parameters, and Slots
Design Notes on Question Answering
Action Requests
Building Action Requests
Design Notes on Action Requests
Task Completion Requests
Building Task Completion Example 1
Building Task Completion Example 2
Design Notes on Task Completion
Fully Specified Requests
Single-Slot Requests
Implementing Single-Slot Requests
Design Notes on Single-Slot Requests
Multi-slot Requests
Implementing Multi-slot Requests
Design Notes on Multi-slot Requests
Determining Dialog Acts Based on Feature Discovery
Dialog Completion
Responding to “Goodbye” and “Thanks”
Implementing the End of a Conversation
What’s Next?
Summary
Chapter 7: Resolving Incomplete Requests Through Disambiguation
Incomplete Requests
Reaching Completeness Through Dialog Management
Implementing Request Completion
Notes on Implementing Request Completion
Ambiguous Requests
Disambiguation Methods
Logic-Based Assumptions
Yes/No Questions
Implementing Yes/No Questions
Notes on Implementing Yes/No Questions
A/B Sets
Implementing A/B Sets
Notes on Implementing A/B Sets
Static Lists
Implementing Static Lists
Notes on Implementing Static Lists
Dynamic Lists
Implementing Dynamic Lists
Notes on Implementing Dynamic Lists
Open Sets
Implementing Open Sets
Notes on Implementing Open Sets
Menus
Implementing Menus
Notes on Implementing Menus
Testing on the Device to Find and Solve Issues
Two Big Lessons
Webhooks 1: Toward Code Independence
Fulfillment and Webhooks
Webhook Overview
Webhook in Depth
Contexts, Context Parameters, and Follow-Up Intents
What’s Next
Summary
Chapter 8: Conveying Reassurance with Confidence and Confirmation
Conveying Reassurance and Shared Certainty
Setting Expectations with Your Implications
Webhooks 2
JSON
The Webhook Request
The Webhook Response
Custom Payloads
Implementing the Webhook
Confirmation Methods
Non-verbal Confirmation
Code for Non-verbal Confirmation
Notes on Non-verbal Confirmation
Generic Acknowledgment
Implicit Confirmation
Code for Implicit Confirmation
What If the User Says No?
Notes on Implicit Confirmation
Explicit Confirmation
Code for Explicit Confirmation
Dialogflow, App Engine, and Statelessness
Notes on Explicit Confirmation
Confirmation Placement: Slots vs. Intents
Disconfirmation: Dealing with “No”
Code for Disconfirmation
Notes on Disconfirmation
Additional Reassurance Techniques and Pitfalls
System Pronunciation
Backchannels
Discourse Markers
VUI Architecture
Choosing the Right Reassurance Method
Summary
Chapter 9: Helping Users Succeed Through Consistency
Universals
Providing Clarification and Additional Information
Providing a Do-Over
Providing an Exit
Coding Universals
Step 1: Creating Intents
Step 2: Coding the Webhook
Step 3: Adding Repeat
Step 4: Checking Context Robustness
Step 5: Ending the Conversation
Sidebar: Cleaning Up the Code
Navigation
Landmarks
Non-verbal Audio
Code for NVA
Content Playback Navigation
List Navigation
Consistency, Variation, and Randomization
Code for Randomization
Working with Built-In Global Intents
Consistency and Standards Across VUIs and Frameworks
What’s Next?
Summary
Chapter 10: Creating Robust Coverage for Speech-to-Text Resolution
Recognition Is Speech-to-Text Interpretation
Inside the STT Box
Creating Sentences with Smaller Pieces
Using STT to Build Up Sentences
Recognition Engines
Grammar Concepts
Coverage
Recognition Space
Static or Dynamic, Large or Small
End-Pointing
Multiple Hypotheses
Types of Grammars
Rule-Based Grammars
Statistical Models
Hot Words, Wake Words, and Invocations
Working with Grammars
Writing Rule-Based Regular Expressions
Regular Expressions Defined
Grammars and Training Phrases
Sub-grammars
Big Sub-grammars
Pronunciations
How to Succeed with Grammars
Bootstrap
Normalize Punctuation and Spellings
Handle Unusual Pronunciations
Use Domain Knowledge
Understand the Strengths and Limitations of STT
Hands-On: Taking Control over Coverage
Changes in Dialogflow
Remove Existing Sample Phrases
Add an Event
Regular Expressions in the Webhook
Handling the Phrase If No Other Intent Does
Why Do It This Way?
Programming Sidebar: Debugging the Webhook
Limitations on Grammar Creation and Use
What’s Next
Summary
Chapter 11: Reaching Understanding
From Words to Meaning
NLP
NLU
In-Depth: What’s “Smart,” AI, and Understanding?
Parsing
Machine Learning and NLU
Ontologies, Knowledge Bases, and Content Databases
Intents
Intent Tagging and Tagging Guides
Middle Layers: Semantic Tags vs. System Endpoints
Putting It All Together
Matching Wide or Narrow
Multiple Grammars, Multiple Passes
The Stanford Parser Revisited
Determining Intent
Introducing spaCy
Loading spaCy
Calling spaCy
Using spaCy’s Dependency Parse
Dialogflow Changes
In-Depth: Understanding, Parsing, and Knowledge in Practice
Revisiting Intents
Machine Learning and Using Knowledge
The Not-So-Distant Future?
What’s Next?
Summary
Chapter 12: Applying Accuracy Strategies to Avoid Misunderstanding
Accuracy Robustness Concepts
Accuracy Robustness Strategies
Examples
Implementing Examples
Providing Help
Notes on Designing for Help
Just-in-Time Information
Notes on Designing for JIT
Hidden Options and “None of Those”
Recognize-and-Reject
One-Step Correction
Implementing One-Step Correction
Notes on One-Step Correction
Tutorials
Spelling
Narrowing the Recognition Space
Advanced Techniques
Multi-tier Behavior and Confidence Scores
Implementing Multi-tier Confirmation
Notes on Multi-tier Confidence-Based Design
N-Best and Skip Lists
Implementing Skip Lists
Notes on N-Best and Skip List Design
Probabilities
Timeout and Latency
What’s Next
Summary
Chapter 13: Choosing Strategies to Recover from Miscommunication
Recovery from What?
Recognition, Intent, or Fulfillment Errors
Recovery Strategies
Meaningful Contextual Prompts
Escalating Prompts
Code for Escalating Prompts
Tapered Prompts
Rapid Reprompt
Backoff Strategies
When to Stop Trying
Max Error Counts
Code for Keeping Track of Max Errors
Transfers
Choosing a Recovery Strategy
What’s Next
Summary
Chapter 14: Using Context and Data to Create Smarter Conversations
Why There’s No Conversation Without Context
Hands-On: Context Complexity Thought Experiment
Data Access
External Accounts and Services
Persistence Tracking
Context-Aware and Context-Dependent Dialogs
Discourse Markers and Acknowledgments
Code for Context-Aware Dialogs
Anaphora Resolution
Follow-Up Dialogs and Linked Requests
Code for Follow-Up Dialogs
Proactive Behaviors
Code for Proactive Behaviors
Topic, Domain, and World Knowledge
Geolocation-Based Behavior
Proximity and Relevance
Number and Type of Devices
Time and Day
User Identity, Preferences, and Account Types
User Utterance Wording
System Conditions
Tracking Context in Modular and Multi-turn Dialogs
Fulfillment
What’s Next?
Summary
Chapter 15: Creating Secure Personalized Experiences
The Importance of Knowing Who’s Talking
Individualized Targeted Behaviors
Concepts in Personalization and Customization
Implementing Individualized Experiences
Code for Personalized Experiences
In-Depth: Context or History?
Authorized Secure Access
Approaches to Identification and Authentication
Implementing Secure Gated Access
Notes on Implementing Access
Privacy and Security Concerns
System Persona
Defining and Implementing a System Persona
How Persona Affects Dialogs
System Voice Audio
TTS Synthesis or Voice Talent, Generated or Recorded
Finding and Working with Voice Talents
One or Several Voices
Prompt Management
Emotion and Style
Voice for Specific User Groups
What’s Next?
Summary
Part IV: The Launch Phase: Verifying and Tuning
Chapter 16: Testing and Measuring Voice System Performance
Testing Voice System Performance
Recognition Testing
Dialog Traversal: Functional End-to-End Testing
Wake Word and Speech Detection Testing
Other Types of System Integration Testing
Testing Usability and Task Completion
Voice Usability Testing Concepts
Study Methodology: Task Scenarios and Surveys
Study Environment: In-Lab or Remote
Study Administration: Moderated or Unmoderated
Results: Quantitative or Qualitative
Wizard of Oz Studies
Developing the WOZ
Tracking and Measuring Performance
Recognition Performance Metrics
Task Completion Metrics
Audio and TTS Testing
User Satisfaction Metrics
Functional System Task Scenario Studies
Administered and Crowdsourced Surveys
In-App Automated Surveys
Business Metrics
What’s Next?
Summary
Chapter 17: Tuning and Deploying Voice Systems
Tuning: What Is It and Why Do You Do It?
Why Recognition Accuracy Isn’t Enough
Analyzing Causes of Poor System Performance
Tuning Types and Approaches
Log-Based vs. Transcription-Based Tuning
Coverage Tuning
Ambiguity Tuning
Recognition Accuracy Tuning
Acoustic Confusability Tuning
Dictionary Tuning
Confidence Threshold
Timeout and Probability Parameters
In-Depth: Building Accuracy from Sample Phrases
Finding and Using Recognition Accuracy Data
Task Completion Tuning
Code for Task Completion Analysis
Dialog Tuning
Intent Tuning
How to Prioritize Your Tuning Efforts
Mapping Observations to the Right Remedy
Reporting On and Using Tuning Results
How to Maximize Deployment Success
Know When to Tune
Understand Tuning Complexities to Avoid Pitfalls
What’s Next?
Summary
Index
Recommend Papers

Mastering Voice Interface
 9781484270059

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Mastering Voice Interfaces Creating Great Voice Apps for Real Users — Ann Thymé-Gobbel Charles Jankowski

Mastering Voice Interfaces Creating Great Voice Apps for Real Users

Ann Thymé-Gobbel Charles Jankowski

Mastering Voice Interfaces Ann Thymé-Gobbel Brisbane, CA, USA ISBN-13 (pbk): 978-1-4842-7004-2 https://doi.org/10.1007/978-1-4842-7005-9

Charles Jankowski Fremont, CA, USA ISBN-13 (electronic): 978-1-4842-7005-9

Copyright © 2021 by Ann Thymé-Gobbel, Charles Jankowski This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Celestin Suresh John Development Editor: Matthew Moodie Coordinating Editor: Aditee Mirashi Cover designed by eStudioCalamar Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail [email protected]; for reprint, paperback, or audio rights, please e-mail [email protected]. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/978-­1-­4842-­7004-­2. For more detailed information, please visit http://www.apress.com/source-­code. Printed on acid-free paper

To all who strive to create better voice experiences—and all who want to use them.

Table of Contents About the Authors���������������������������������������������������������������������������������������������������xix About the Technical Reviewers������������������������������������������������������������������������������xxi Acknowledgments������������������������������������������������������������������������������������������������xxiii Introduction�����������������������������������������������������������������������������������������������������������xxv

Part I: Conversational Voice System Foundations��������������������������������� 1 Chapter 1: Say Hello to Voice Systems����������������������������������������������������������� 3 Voice-First, Voice-Only, and Conversational Everything���������������������������������������������������������������� 5 Claims About Voice Technology����������������������������������������������������������������������������������������������������� 7 Claim: Everyone Has a Smart Voice Device and Uses It All the Time��������������������������������������� 7 Claim: You Can Simply “Add Voice” to an Existing GUI or Touch Interface������������������������������� 8 Claim: Voice or Chatbot, Both Are Conversational So Basically the Same������������������������������� 9 Claim: I Speak the Language; What More Is There to VUI Design?������������������������������������������ 9 Claim: Every Voice Solution Needs a Strong Personality������������������������������������������������������� 10 Claim: Hire a Scriptwriter; They Can Write Conversations����������������������������������������������������� 10 Claim: Recognition Is a Solved Problem; It’s Basically Perfect Today������������������������������������ 11 Claim: AI Takes Care of Understanding What People Say������������������������������������������������������ 13 Claim: IVRs Are Irrelevant Today, Nothing to Be Learned from Them������������������������������������� 14 Claim: That Ship Has Sailed; Alexa Is the Winner������������������������������������������������������������������ 15 Claim: Everyone Needs a Voice Solution; Voice Is Great for Everything�������������������������������� 16 Introduction to Voice Technology Components��������������������������������������������������������������������������� 16 Speech-to-Text���������������������������������������������������������������������������������������������������������������������� 18 Natural Language Understanding������������������������������������������������������������������������������������������ 20 Dialog Management�������������������������������������������������������������������������������������������������������������� 21

v

Table of Contents

Natural Language Generation������������������������������������������������������������������������������������������������ 24 Text-to-Speech���������������������������������������������������������������������������������������������������������������������� 26 The House That Voice Built: The Phases of Voice Development Success������������������������������������ 29 Plan��������������������������������������������������������������������������������������������������������������������������������������� 31 Design����������������������������������������������������������������������������������������������������������������������������������� 33 Build�������������������������������������������������������������������������������������������������������������������������������������� 35 Test���������������������������������������������������������������������������������������������������������������������������������������� 36 Deploy and Assess����������������������������������������������������������������������������������������������������������������� 36 Iterate������������������������������������������������������������������������������������������������������������������������������������ 37 What Next?���������������������������������������������������������������������������������������������������������������������������������� 38 Summary������������������������������������������������������������������������������������������������������������������������������������ 39

Chapter 2: Keeping Voice in Mind����������������������������������������������������������������� 41 Why Voice Is Different����������������������������������������������������������������������������������������������������������������� 41 Hands-On: A Precoding Thought Experiment������������������������������������������������������������������������������ 44 Voice Dialog and Its Participants������������������������������������������������������������������������������������������������ 45 The Human: Spoken Natural Language��������������������������������������������������������������������������������� 46 The Computer: Voice Recognition and Interpretation������������������������������������������������������������ 54 Human-Computer Voice Dialog���������������������������������������������������������������������������������������������� 59 What’s Next?������������������������������������������������������������������������������������������������������������������������������� 66 Summary������������������������������������������������������������������������������������������������������������������������������������ 67

Chapter 3: Running a Voice App—and Noticing Issues�������������������������������� 69 Hands-On: Preparing the Restaurant Finder������������������������������������������������������������������������������� 69 Choosing Voice Platforms����������������������������������������������������������������������������������������������������������� 71 Hands-On: Implementing the Restaurant Finder������������������������������������������������������������������������� 72 Basic Setup��������������������������������������������������������������������������������������������������������������������������� 73 Step 1: Respond to an Invocation������������������������������������������������������������������������������������������ 73 Step 2: Specify What the User Says�������������������������������������������������������������������������������������� 74 Step 3: Specify What the VUI Says����������������������������������������������������������������������������������������� 74 Step 4: Connect Dialogflow to Actions on Google������������������������������������������������������������������ 75

vi

Table of Contents

Step 5: Test Your VUI�������������������������������������������������������������������������������������������������������������� 75 Step 6: Save, Export, or Import Your Work����������������������������������������������������������������������������� 78 Why We’re Using Actions on Google and Assistant��������������������������������������������������������������������� 79 Google’s Voice Development Ecosystem������������������������������������������������������������������������������������� 80 Actions on Google������������������������������������������������������������������������������������������������������������������ 81 The Pros and Cons of Relying on Tools��������������������������������������������������������������������������������������� 82 Hands-On: Making Changes�������������������������������������������������������������������������������������������������������� 84 Adding More Phrases with the Same Meaning��������������������������������������������������������������������� 86 Expanding Information Coverage������������������������������������������������������������������������������������������ 88 Adding Granularity����������������������������������������������������������������������������������������������������������������� 89 What’s Next?������������������������������������������������������������������������������������������������������������������������������� 92 Summary������������������������������������������������������������������������������������������������������������������������������������ 93

Part II: The Planning Phase: Requirements Discovery and High-Level Design Definition���������������������������������������������������� 95 Chapter 4: Define Through Discovery: Building What, How, and Why for Whom���������������������������������������������������������������������� 97 General Functionality: What Are You Building?���������������������������������������������������������������������������� 99 User Needs: Who’ll Use It and What Do They Want?����������������������������������������������������������������� 101 Demographics and Characteristics������������������������������������������������������������������������������������� 102 Engagement Patterns���������������������������������������������������������������������������������������������������������� 104 Mental Models and Domain Knowledge������������������������������������������������������������������������������ 105 Environment and State of Mind������������������������������������������������������������������������������������������� 106 From General to Detailed Functionality������������������������������������������������������������������������������������� 107 Step 1: Define the Core Features����������������������������������������������������������������������������������������� 108 Step 2: From Features to Intents and Slots������������������������������������������������������������������������� 110 Business Requirements: Why Are You Building It?�������������������������������������������������������������������� 117 General Purpose and Goal��������������������������������������������������������������������������������������������������� 118 Underlying Service and Existing Automation����������������������������������������������������������������������� 121 Branding and Terminology��������������������������������������������������������������������������������������������������� 122 Access and Availability�������������������������������������������������������������������������������������������������������� 124 Legal and Business Constraints������������������������������������������������������������������������������������������ 126 vii

Table of Contents

System Requirements: How Will You Build It?�������������������������������������������������������������������������� 129 Recognizer, Parser, and Interpreter������������������������������������������������������������������������������������� 130 External Data Sources��������������������������������������������������������������������������������������������������������� 133 Data Storage and Data Access�������������������������������������������������������������������������������������������� 133 Other System Concerns������������������������������������������������������������������������������������������������������� 134 What’s Next?����������������������������������������������������������������������������������������������������������������������������� 136 Summary���������������������������������������������������������������������������������������������������������������������������������� 136

Chapter 5: From Discovery to UX and UI: Tools of Voice Design����������������� 137 Where to Find Early User Data on Any Budget�������������������������������������������������������������������������� 137 Online Research and Crowdsourcing Options��������������������������������������������������������������������� 138 Dialog Participant Observation�������������������������������������������������������������������������������������������� 141 Focus Groups, Interviews, and Surveys������������������������������������������������������������������������������� 144 How Discovery Informs VUI Design Decisions��������������������������������������������������������������������������� 147 Discovery Informing Design: An Example���������������������������������������������������������������������������� 148 Dialog Manager Graph, Yes; Hierarchical Decision Tree, No������������������������������������������������ 153 Capturing and Documenting VUI Design����������������������������������������������������������������������������������� 155 Dialog Flows������������������������������������������������������������������������������������������������������������������������ 155 Sample Dialogs�������������������������������������������������������������������������������������������������������������������� 156 Detailed Design Specifications�������������������������������������������������������������������������������������������� 159 VUI Design Documentation Approaches������������������������������������������������������������������������������ 160 Prototyping and Testing Your Assumptions�������������������������������������������������������������������������� 166 Voice UX and Prototyping Approaches��������������������������������������������������������������������������������� 167 What’s Next?����������������������������������������������������������������������������������������������������������������������������� 170 Summary���������������������������������������������������������������������������������������������������������������������������������� 171

Part III: The Building Phase: Design-Informed Development������������� 173 Chapter 6: Applying Human “Rules of Dialog” to Reach Conversation Resolution��������������������������������������������������������������������������������� 175 Dialog Acts, Games, and Turns—and Grice������������������������������������������������������������������������������� 176 In-Depth: Reaching the End of a Dialog Through Grice’s Cooperative Principle������������������ 180

viii

Table of Contents

Question Answering������������������������������������������������������������������������������������������������������������������ 180 Building Out the Question Answering Example������������������������������������������������������������������� 181 In-Depth: Entities, Parameters, and Slots���������������������������������������������������������������������������� 190 Design Notes on Question Answering��������������������������������������������������������������������������������� 191 Action Requests������������������������������������������������������������������������������������������������������������������������ 194 Building Action Requests����������������������������������������������������������������������������������������������������� 195 Design Notes on Action Requests���������������������������������������������������������������������������������������� 196 Task Completion Requests�������������������������������������������������������������������������������������������������������� 198 Building Task Completion Example 1����������������������������������������������������������������������������������� 199 Building Task Completion Example 2����������������������������������������������������������������������������������� 201 Design Notes on Task Completion��������������������������������������������������������������������������������������� 207 Fully Specified Requests����������������������������������������������������������������������������������������������������������� 208 Single-Slot Requests����������������������������������������������������������������������������������������������������������� 209 Multi-slot Requests��