drupal alexa and big mouth billy bass walk into a bar
play

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


  1. Drupal, Alexa, and Big Mouth Billy Bass Walk into a baR Amber Matz & Blake Hall DrupalCon Baltimore April 27, 2017

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

  3. What We’ll CoveR... • Alexa SkillS: 
 Concepts & process • 3 Implementation Approaches • Demo: Starring Big Mouth Billy Bass as “Alexa”

  4. Types of Skills • Custom skills • Smart Home Skills API • Flash Briefing Skill API

  5. You will be... • Ready to create your own custom alexa skill! • With or without Drupal • Using AWS Lambda or custom web services Endpoint

  6. Design a Voice User Interface

  7. “Alexa Ask fish jokes for a silly joke”

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

  9. Activation Invocation Utterance Intent

  10. Alexa ask fish jokes for a silly joke

  11. Activati oo Alexa ask fish jokes for a silly joke

  12. Activation • Alexa, Echo, amazon, or Computer • Fixed by Amazon • Can’t be customized • configurable by device

  13. Activati oo Invocati oo Alexa ask fish jokes for a silly joke

  14. Invocation • “open”, “launch”, “ask” 
 + your skill name • how your skill is opened

  15. Activati oo Invocati oo Alexa ask fish jokes for a silly joke U tues ance & Intent

  16. Utterances • The phrases your skill will recognize • think about the variables you need (slots)

  17. Intents • map utterances to functionality • some are built in 
 (help, stop, cancel)

  18. Activati oo Invocati oo Alexa ask fish jokes for a silly joke U tues ance & Intent

  19. Design the Interaction model

  20. Start with Utterances • primary interaction method • Defines interaction model • support several intents

  21. Custom skills

  22. Request… AWS 
 Lambda User Skill Alexa Device Web Service Resp oo se.

  23. Lambda Blueprints AWS AWS 
 Lambda Lambda Blueprints Alexa Skill Find oo Al ey a GitHub • Java • Pyth oo • Node.js Resp oo se

  24. Lambda data sources Hard- AWS 
 Lambda coded values in an array os Alexa Skill Results from a Web Services Resp oo se API Call

  25. Hard-coded values Hard- AWS 
 coded values in Lambda an array Alexa Skill Resp oo se

  26. Web services API call AWS 
 Lambda Views JSON Alexa Skill Results from a Web Services Resp oo se API Call

  27. All Drupal Self- Hosted Alexa Skill Web Service

  28. Creating a custom alexa skill

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

  30. Locate the docs

  31. Custom Skills docs

  32. Add a new skill

  33. configuration • created in developer portal • so that: alexa can route requests to the service for your skill • brings all skill components together

  34. Invocation Name • Identifies the skill • user includes this name when initiating a conversation with your skill • must be unique

  35. Skill Information Invocati oo Name

  36. Interaction model • Intents • slots • utterances

  37. Interaction model

  38. Sample Utterances • words/phrases users say to invoke intents • you map utterances to intents • this map forms the interaction model

  39. Sample Utterances with ov t slots

  40. Sample Utterances with slots

  41. Sample utterances Cust on intent 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 Cust on intent GetFishJokes tell me a joke Cust on slot type GetFishJokes give me a joke GetFishJokes get me a joke GetFishJokes joke GetFishJokes jokes

  42. Sample Utterances Guidelines: • Do not include “Alexa”, “Amazon”, “Echo”, etc. • DO not include the name of your skill

  43. Sample Utterances Guidelines: • Do include A variety of phrases • DO include “slot names” in curly brackets

  44. Intents Represent: • actions users can do with your skill • core functionality

  45. Intent Schema • A JSON structure that declares the set of intents your skill can accept and process

  46. 
 Intent Schema TIP: • Include Built-In Amazon intents for common actions: 
 “stop”, “Help”, “CANCEL”, ETC.

  47. Intent Schema { " intents ": [ { Cust on intent " intent ": " GetNewFactIntent " }, } { " intent ": "AMAZON.HelpIntent" Amaz oo }, { built-in " intent ": "AMAZON.StopIntent" }, intents { " intent ": "AMAZON.CancelIntent" } ] }

  48. slots • Optional Arguments • Needs a Type • Custom or Built-in

  49. Intent Schema { " intents ": [ { Cust on intent " intent ": "GetCategorizedJokes", " slots ": [ { " name ": "Category", Cust on slot type " type ": "LIST_OF_CATEGORIES" } ] }, { Cust on intent } " intent ": "GetFishJokes", }, { Amaz oo " intent ": "AMAZON.HelpIntent" }, { built-in " intent ": "AMAZON.StopIntent" }, { intents " intent ": "AMAZON.CancelIntent" } ] }

  50. Endpoint

  51. endpoint examples

  52. Request… AWS 
 Lambda User Skill Alexa Device Web Service Resp oo se.

  53. getting started • Tip: Use sample code! • Refer to the docs! • Check out Alexa Github!

  54. Write the code Using AWS LAMBDA? • Node.jS • Java • Python

  55. simple example

  56. Hard-coded values Hard- AWS 
 coded values in Lambda an array Alexa Skill Resp oo se

  57. Intent schema

  58. utterances

  59. A rs ay of Jokes

  60. Rand on Joke

  61. web service

  62. Web services API call AWS 
 Lambda Views JSON Alexa Skill Results from a Web Services Resp oo se API Call

  63. Intent schema

  64. utterances

  65. API Endp oj nt P as se the resp oo se

  66. Views rest export

  67. all drupal (no lambda)

  68. All Drupal Self- Hosted Alexa Skill Web Service

  69. there’s a module for that!

  70. Alexa module config • give drupal your alexa application id • give alexa the resource callback • write some code

  71. Event Subs cs ib es

  72. Slot Rand on Joke

  73. Resp oo se

  74. “Alexa Ask fish jokes for a silly joke”

  75. publishing your skill

  76. Test your skill • Test with service simulator (in developer portal) • Test on Alexa-Enabled device

  77. certification • Write description • Create + Upload Icon • Submission Checklist • Check email for feedback

  78. 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

  79. Continue development

  80. demo time

  81. ECHO DOT + ARDUINO 
 + Big Mouth Billy Bass 2 motors connected. 1 in use. Headphone Audio out 12v power

  82. 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/

  83. “Alexa, 
 Ask Fish jokes 
 for a silly Joke”

  84. alexa, give me my flash briefing

  85. 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

  86. Sprints! • Who? Developers, Doc Writers, Project managers, bug reporters, Qa testers, and YOU! • Mentors available! • https://events.drupal.org/baltimore2017/sprints

  87. Recap • Overview of Alexa Skill creation process • Integrate Drupal with Alexa! • Demo: Starring Big Mouth Billy Bass as “Alexa”

  88. 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!

  89. q&A?

Recommend


More recommend