Drupal, Alexa, and Big Mouth Billy Bass Walk into a baR Amber Matz - - PowerPoint PPT Presentation

drupal alexa and big mouth billy bass walk into a bar
SMART_READER_LITE
LIVE PREVIEW

Drupal, Alexa, and Big Mouth Billy Bass Walk into a baR Amber Matz - - PowerPoint PPT Presentation

Drupal, Alexa, and Big Mouth Billy Bass Walk into a baR Amber Matz & Blake Hall DrupalCon Baltimore April 27, 2017 About us Amber Matz Blake Hall Production Manager and Trainer Senior Developer and Trainer Drupalize.Me Drupalize.Me


slide-1
SLIDE 1

Drupal, Alexa, and Big Mouth Billy Bass Walk into a baR

DrupalCon Baltimore April 27, 2017

Amber Matz & Blake Hall

slide-2
SLIDE 2

About us

Amber Matz Production Manager and Trainer Drupalize.Me @amberhimesmatz Blake Hall Senior Developer and Trainer Drupalize.Me @blakehall

slide-3
SLIDE 3

What We’ll CoveR...

  • Alexa SkillS: 


Concepts & process

  • 3 Implementation

Approaches

  • Demo: Starring Big Mouth

Billy Bass as “Alexa”

slide-4
SLIDE 4
  • Custom skills
  • Smart Home Skills API
  • Flash Briefing Skill API

Types of Skills

slide-5
SLIDE 5

You will be...

  • Ready to create your
  • wn custom alexa skill!
  • With or without Drupal
  • Using AWS Lambda or

custom web services Endpoint

slide-6
SLIDE 6

Design a Voice User Interface

slide-7
SLIDE 7

“Alexa Ask fish jokes for a silly joke”

slide-8
SLIDE 8

Flow Diagram

Alexa, ask Fish Jokes for a [silly] joke. Return a joke tagged with term “silly” from fishjokes4.life 
 (Drupal site)

slide-9
SLIDE 9

Activation Invocation Utterance Intent

slide-10
SLIDE 10

Alexa ask fish jokes for a silly joke

slide-11
SLIDE 11

Alexa ask fish jokes for a silly joke

Activatioo

slide-12
SLIDE 12

Activation

  • Alexa, Echo, amazon, or

Computer

  • Fixed by Amazon
  • Can’t be customized
  • configurable by device
slide-13
SLIDE 13

Alexa ask fish jokes for a silly joke

Activatioo Invocatioo

slide-14
SLIDE 14

Invocation

  • “open”, “launch”, “ask” 


+ your skill name

  • how your skill is opened
slide-15
SLIDE 15

Alexa ask fish jokes for a silly joke

Activatioo Invocatioo Utuesance & Intent

slide-16
SLIDE 16

Utterances

  • The phrases your skill

will recognize

  • think about the

variables you need (slots)

slide-17
SLIDE 17

Intents

  • map utterances to

functionality

  • some are built in 


(help, stop, cancel)

slide-18
SLIDE 18

Alexa ask fish jokes for a silly joke

Activatioo Invocatioo Utuesance & Intent

slide-19
SLIDE 19

Design the Interaction model

slide-20
SLIDE 20

Start with Utterances

  • primary interaction

method

  • Defines interaction

model

  • support several intents
slide-21
SLIDE 21

Custom skills

slide-22
SLIDE 22

AWS
 Lambda Web Service

Alexa

Request… Respoose.

Skill

User

Device

slide-23
SLIDE 23

Lambda Blueprints

Skill Alexa

AWS
 Lambda

Respoose

  • Java
  • Pythoo
  • Node.js

Find oo Aleya GitHub

AWS Lambda Blueprints

slide-24
SLIDE 24

Lambda data sources

Alexa

Respoose

  • s

AWS
 Lambda

Skill Results from a Web Services API Call Hard- coded values in an array

slide-25
SLIDE 25

Hard-coded values

Skill Alexa

AWS
 Lambda

Respoose

Hard- coded values in an array

slide-26
SLIDE 26

Web services API call

Skill Alexa

AWS
 Lambda

Respoose

Results from a Web Services API Call

Views JSON

slide-27
SLIDE 27

All Drupal

Skill Alexa

Web Service

Self- Hosted

slide-28
SLIDE 28

Creating a custom alexa skill

slide-29
SLIDE 29

Get ready to rock

Create an Amazon Developer Account Sign in to developer.amazon.com Get started > Alexa Skills Kit

slide-30
SLIDE 30

Locate the docs

slide-31
SLIDE 31

Custom Skills docs

slide-32
SLIDE 32

Add a new skill

slide-33
SLIDE 33

configuration

  • created in developer portal
  • so that: alexa can route

requests to the service for your skill

  • brings all skill components

together

slide-34
SLIDE 34

Invocation Name

  • Identifies the skill
  • user includes this name

when initiating a conversation with your skill

  • must be unique
slide-35
SLIDE 35

Skill Information

Invocatioo Name

slide-36
SLIDE 36

Interaction model

  • Intents
  • slots
  • utterances
slide-37
SLIDE 37

Interaction model

slide-38
SLIDE 38

Sample Utterances

  • words/phrases users say

to invoke intents

  • you map utterances to

intents

  • this map forms the

interaction model

slide-39
SLIDE 39

Sample Utterances

withovt slots

slide-40
SLIDE 40

Sample Utterances

with slots

slide-41
SLIDE 41

Sample utterances

GetCategorizedJokes tell me a joke about {Category} GetCategorizedJokes tell me a {Category} joke GetCategorizedJokes give me a joke about {Category} GetCategorizedJokes give me a {Category} joke GetCategorizedJokes joke about {Category} GetCategorizedJokes jokes about {Category} GetCategorizedJokes for a {Category} joke GetCategorizedJokes for {Category} jokes GetFishJokes tell me a joke GetFishJokes give me a joke GetFishJokes get me a joke GetFishJokes joke GetFishJokes jokes

Custon slot type Custon intent Custon intent

slide-42
SLIDE 42

Sample Utterances

Guidelines:

  • Do not include “Alexa”,

“Amazon”, “Echo”, etc.

  • DO not include the name
  • f your skill
slide-43
SLIDE 43

Sample Utterances

Guidelines:

  • Do include A variety of

phrases

  • DO include “slot names”

in curly brackets

slide-44
SLIDE 44

Intents

Represent:

  • actions users can do with

your skill

  • core functionality
slide-45
SLIDE 45

Intent Schema

  • A JSON structure that

declares the set of intents your skill can accept and process

slide-46
SLIDE 46

Intent Schema

TIP:

  • Include Built-In Amazon

intents for common actions:
 
 “stop”, “Help”, “CANCEL”, ETC.

slide-47
SLIDE 47

Intent Schema

{ "intents": [ { "intent": "GetNewFactIntent" }, { "intent": "AMAZON.HelpIntent" }, { "intent": "AMAZON.StopIntent" }, { "intent": "AMAZON.CancelIntent" } ] }

}

Custon intent Amazoo built-in intents

slide-48
SLIDE 48

slots

  • Optional Arguments
  • Needs a Type
  • Custom or Built-in
slide-49
SLIDE 49

Intent Schema

{ "intents": [ { "intent": "GetCategorizedJokes", "slots": [ { "name": "Category", "type": "LIST_OF_CATEGORIES" } ] }, { "intent": "GetFishJokes", }, { "intent": "AMAZON.HelpIntent" }, { "intent": "AMAZON.StopIntent" }, { "intent": "AMAZON.CancelIntent" } ] }

Custon intent Custon intent

}

Amazoo built-in intents Custon slot type

slide-50
SLIDE 50

Endpoint

slide-51
SLIDE 51

endpoint examples

slide-52
SLIDE 52

AWS
 Lambda Web Service

Alexa

Request… Respoose.

Skill

User

Device

slide-53
SLIDE 53

getting started

  • Tip: Use sample code!
  • Refer to the docs!
  • Check out Alexa Github!
slide-54
SLIDE 54

Write the code

Using AWS LAMBDA?

  • Node.jS
  • Java
  • Python
slide-55
SLIDE 55

simple example

slide-56
SLIDE 56

Hard-coded values

Skill Alexa

AWS
 Lambda

Respoose

Hard- coded values in an array

slide-57
SLIDE 57

Intent schema

slide-58
SLIDE 58

utterances

slide-59
SLIDE 59

Arsay of Jokes

slide-60
SLIDE 60

Randon Joke

slide-61
SLIDE 61

web service

slide-62
SLIDE 62

Web services API call

Skill Alexa

AWS
 Lambda

Respoose

Results from a Web Services API Call

Views JSON

slide-63
SLIDE 63

Intent schema

slide-64
SLIDE 64

utterances

slide-65
SLIDE 65

API Endpojnt Passe the respoose

slide-66
SLIDE 66

Views rest export

slide-67
SLIDE 67

all drupal (no lambda)

slide-68
SLIDE 68

All Drupal

Skill Alexa

Web Service

Self- Hosted

slide-69
SLIDE 69

there’s a module for that!

slide-70
SLIDE 70
slide-71
SLIDE 71

Alexa module config

  • give drupal your alexa

application id

  • give alexa the resource

callback

  • write some code
slide-72
SLIDE 72

Event Subscsibes

slide-73
SLIDE 73

Slot Randon Joke

slide-74
SLIDE 74

Respoose

slide-75
SLIDE 75

“Alexa Ask fish jokes for a silly joke”

slide-76
SLIDE 76
slide-77
SLIDE 77

publishing your skill

slide-78
SLIDE 78

Test your skill

  • Test with service

simulator (in developer portal)

  • Test on Alexa-Enabled

device

slide-79
SLIDE 79

certification

  • Write description
  • Create + Upload Icon
  • Submission Checklist
  • Check email for feedback
slide-80
SLIDE 80

Continue development

After skill “Goes Live”:

  • Dev version auto-created

in Developer portal

  • Work on dev, submit when

ready

  • Certified dev version

replaces live version

slide-81
SLIDE 81

Continue development

slide-82
SLIDE 82

demo time

slide-83
SLIDE 83

ECHO DOT + ARDUINO 
 + Big Mouth Billy Bass

12v power

Headphone Audio out

2 motors connected. 1 in use.

slide-84
SLIDE 84

Tutorial

  • Instructables.com
  • “Animate a Billy Bass

Mouth With Any Audio Source”

  • by Donald Bell

http://www.instructables.com/id/Animate-a-Billy-Bass-Mouth-With-Any-Audio-Source/

slide-85
SLIDE 85

“Alexa, 
 Ask Fish jokes 
 for a silly Joke”

slide-86
SLIDE 86

alexa, give me my flash briefing

slide-87
SLIDE 87

Win an Echo Dot!

  • Go To twitter.com/drupalizeme
  • RT our tweet about the

drupalize.Me Flash Briefing Skill

  • We’ll pick a random winner
  • Closes at 1:00pm
  • must be present at drupalcon

to win

slide-88
SLIDE 88

Sprints!

  • Who? Developers, Doc Writers,

Project managers, bug reporters, Qa testers, and YOU!

  • Mentors available!
  • https://events.drupal.org/baltimore2017/sprints
slide-89
SLIDE 89

Recap

  • Overview of Alexa Skill

creation process

  • Integrate Drupal with

Alexa!

  • Demo: Starring Big Mouth

Billy Bass as “Alexa”

slide-90
SLIDE 90

Evaluations

Find our session page on the DrupalCon Baltimore website to find and complete an evaluation: https://events.drupal.org/baltimore2017/ sessions/drupal-alexa-and-big-mouth-billy- bass-walk-bar Thank you!

slide-91
SLIDE 91

q&A?