Voice Applications for Alexa and Google Assistant
Dustin A. Coates
Foreword by Max Amordeluso
  • July 2019
  • ISBN 9781617295317
  • 264 pages
  • printed in black & white

Embrace the voice revolution, and start building delightful Alexa skills using this book.

From the foreword by Max Amordeluso, EU Lead Evangelist Alexa

Voice Applications for Alexa and Google Assistant is your guide to designing, building, and implementing voice-based applications for Alexa and Google Assistant. Inside, you'll learn how to build your own "skills"—the voice app term for actions the device can perform—from scratch.

Table of Contents detailed table of contents

1 Introduction to voice first

1.1 What is voice first?

1.2 Designing for voice UIs

1.3 Anatomy of a voice command

1.3.1 Waking the voice-first device

1.3.2 Introducing natural language processing

1.3.3 How speech becomes text

1.3.4 Intents are the functions of a skill

1.3.5 Training the NLU with sample utterances

1.3.6 Plucking pertinent information from spoken text

1.4 The fulfillment code that ties it all together

1.5 Telling the device what to say

Summary

2 Building a call-and-response skill on Alexa

2.1 Skill metadata

2.1.1 Interaction model

2.1.2 Invocation name

2.1.3 Intents

2.1.4 Sample utterances

2.1.5 Slots

2.2 The interaction model

2.2.1 Building the intent

2.2.2 Slots

2.3 Fulfillment

2.3.1 Hosted endpoint

2.3.2 AWS Lambda

2.3.3 Coding the fulfillment

Summary

3 Designing a voice user interface

3.1 VUI fundamentals

3.2 The cooperative principle

3.2.1 Quantity

3.2.2 Quality

3.2.3 Relation

3.2.4 Manner

3.3 VUI planning

3.4 Variety

Summary

4 Using entity resolution and built-in intents to extend an Alexa skill

4.1 Alexa Skills Kit CLI

4.1.1 Creating an Alexa skill project

4.2 Entity resolution

4.2.1 Fulfillment

4.2.2 Built-in intents

4.2.3 LaunchRequest

4.3 Invoking the skill locally

4.4 Summary

5 Making a conversational Alexa skill

5.1 Creating a conversation

5.1.1 State management

5.1.2 Per-state handlers

5.1.3 Handling the unhandled

5.2 Maintaining long-term information

How attributes are saved

5.3 Putting it all together

5.3.1 New intents

5.3.2 New utterances

5.3.3 New fulfillment

5.3.4 Correcting a mistake

Summary

6 VUI and conversation best practices

6.1 Conversations and context

6.2 A skill with context

6.2.1 Frame-based interactions

6.2.2 The fulfillment

6.2.3 Decaying context

6.3 Intercepting responses and requests

6.4 Unit testing

Summary

7 Using conversation tools to add meaning and usability

7.1 Discourse markers

7.2 Controlling the application’s speech with SSML

7.2.1 Breaks and pauses

7.2.2 Prosody

7.2.3 amazon:effect

7.2.4 w, say-as

SSML implementation differences

7.2.5 phoneme

7.3 Embedding audio

Summary

8 Directing conversation flow

8.1 Guiding user interaction

8.2 Dialog interface

8.2.1 Creating the skill

8.2.2 Setting up the dialog model

Creating a dialog model in the console or through the CLI

8.2.3 Slot filling

8.2.4 Intent confirmation

8.2.5 Dialog model fulfillment

8.3 Handling errors

Summary

9 Building for Google Assistant

9.1 Setting up the application

9.2 Building the interaction model

9.2.1 Building an intent

9.2.2 Testing with the simulator

Necessary Google account settings for simulator testing

9.2.3 Parameters and entities

9.2.4 Adding entities

9.2.5 Using parameters in intents

9.3 Fulfillment

Developing locally without deploying

9.3.1 The code

9.3.2 Deployment

9.3.3 Changing the invocation name

Summary

10 Going multimodal

10.1 Introducing multimodal

10.2 Multimodal in actions

10.2.1 Simple responses

10.2.2 Rich responses

10.2.3 List responses

10.2.4 Suggestion chips

10.3 Surface capabilities

10.4 Multisurface conversations

Summary

11 Push interactions

11.1 Routine suggestions

11.1.1 Storing user data

11.1.2 Action suggestion for a routine

11.2 Daily updates

Phone-based testing

11.2.1 Developer control of daily updates

11.3 Push notifications

11.4 Implicit invocation

Summary

12 Building for actions on Google with the Actions SDK

12.1 Dialogflow and the Actions SDK

12.2 App planning

12.3 The action package

Query pattern arguments

12.4 The fulfillment

12.4.1 Parsing input with regular expressions

12.4.2 Handling the unexpected

Summary

Appendixes

Appendix A: Adding an AWS IAM profile

Appendix B: Connecting DynamoDB to a Lambda function

About the Technology

In 2018, an estimated 100 million voice-controlled devices were installed in homes worldwide, and the apps that control them, like Amazon Alexa and Google Assistant, are getting more powerful, with new skills being added every day. Great voice apps improve how users interact with the web, whether they’re checking the weather, asking for sports scores, or playing a game.

About the book

Voice Applications for Alexa and Google Assistant is your guide to designing, building, and implementing voice-based applications for Alexa and Google Assistant. You’ll learn to build applications that listen to users, store information, and rely on user context, as you create a voice-powered sleep tracker from scratch. With the basics mastered, you’ll dig deeper into multiuse conversational flow and other more-advanced concepts. Smaller projects along the way reinforce your new techniques and best practices.

What's inside

  • Building a call-and-response skill
  • Designing a voice user interface
  • Using conversational context
  • Going multimodal
  • Tips and best practices

About the reader

Perfect for developers with intermediate JavaScript skills and basic Node.js skills. No previous experience with voice-first platforms is required.

About the author

Dustin A. Coates is a developer who focuses on voice and conversational applications. He’s currently the voice search lead at Algolia and is also a Google Developers Expert for Assistant as well as cohost of the VUX World podcast.


combo $59.99 pBook + eBook + liveBook
eBook $47.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks