Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Alexa bootcamp - Skill building 101

1,378 views

Published on

This presentation is from a one-day bootcamp guides you through creating an Alexa Skill (interactive voice application) running on serverless AWS services (Amazon DynamoDB and AWS Lambda).

  • Hey guys! Who wants to chat with me? More photos with me here 👉 http://www.bit.ly/katekoxx
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Alexa bootcamp - Skill building 101

  1. 1. Skill Building 101
  2. 2. DEMO Space Facts
  3. 3. Build the Fact Skill github.com /alexa /skill-sample-nodejs-fact
  4. 4. Project Structure /SpeechAssets /IntentSchema.json /SampleUtterances.txt /src /index.js
  5. 5. Build Space Facts
  6. 6. Alexa Enabled Apps Roger, Lexi, Reverb.ai
  7. 7. alexa, open piano facts wake word skill (invocation) namelaunch Conversational model
  8. 8. alexa, open piano facts wake word skill (invocation) namelaunch Conversational model open, begin, start, launch, ask, tell
  9. 9. alexa, open piano facts wake word skill (invocation) namelaunch Conversational model describe a chord in the key of G Utterance Slot Slot how fast is allegro tempo Utterance Slot
  10. 10. alexa, open piano facts wake word skill (invocation) namelaunch Conversational model describe a chord in the key of G Utterance Slot Slot how fast is allegro tempo Utterance Slot Describe Intent HowFast Intent
  11. 11. Conversational model DescribeIntent describe a {musicthing} in the key of {key} DescribeIntent what is a {musicthing} in the {key} key HowFastIntent how fast is the {tempoName} tempo HowFastIntent how quick is the {tempoName} tempo HowFastIntent what is the tempo for {tempoName} Sample Utterances
  12. 12. UNDER THE HOOD OF ASK A closer look at how the Alexa Skills Kit process a request and returns an appropriate response You Pass Back a Textual or Audio Response You Pass Back a Graphical Response Alexa Converts Text-to-Speech (TTS) & Renders Graphical Component Respond to Intent through Text & Visual Alexa sends Customer Intent to Your Service Your Service processes Request User Makes a Request Audio Stream is sent up to Alexa Alexa Identifies Skill & Recognizes Intent Through ASR & NLU
  13. 13. ASR – Automatic Speech Recognition • The Echo hears an audio stream of up to 8 seconds. • Alexa first hears a bunch of syllables.
  14. 14. ASR – Automatic Speech Recognition fȯr tē tīmz • Forty Times? • For Tea Times? • For Tee Times? • Four Tee Times?
  15. 15. ASR – Automatic Speech Recognition • Homonyms sound the same! • Must train Alexa with Intents and Samples • Define structure and Slot locations
  16. 16. ASR  NLU Natural Language Understanding CalendarLookupIntent Slot: BeverageType Slot values: • Tea, Coffee, Mocha, Chai Samples: For {BeverageType} Times I want {BeverageType} Times
  17. 17. Alexa Service, Inputs and Outputs • Audio In • Intent, Slot out Intent, Slot Sample Utterances Slots Intent SKILL CONFIGURATION SKILL CODE
  18. 18. Your Code • Sees only two things: • INTENT • SLOT VALUE Can maintain state via session attributes
  19. 19. Intent Schema • 1 or more INTENTS • 0 or more SLOTS
  20. 20. Sample Utterances
  21. 21. Built-In Slot Type AMAZON.NUMBER AMAZON.US_CITY AMAZON.US_STATE AMAZON.US_FIRST_NAME AMAZON.DATE AMAZON.DURATION AMAZON.TIME
  22. 22. Custom Slot Type LIST_OF_COLORS
  23. 23. AWS Lambda Functions • Serverless • Free • Receive JSON, return JSON • Respond to Events • Node.JS, Python, Java, C#
  24. 24. AWS Lambda Console
  25. 25. AWS Lambda Console
  26. 26. AWS Lambda Console
  27. 27. AWS Lambda Console
  28. 28. AWS Lambda Console
  29. 29. Build Hello World
  30. 30. What is a slot? Variable Parameter Wildcard
  31. 31. Skill Language Model (VUI) Slot(s) Sample Utterances Lambda Code Intent Schema
  32. 32. Intent Schema
  33. 33. Custom Slot Values LIST_OF_ANIMALS bear bird duck horse frog cat dog sheep fish
  34. 34. Sample Utterances ISeeIntent I see a {Color} {Animal} ISeeIntent My {Animal} is {Color}
  35. 35. I see a red bird
  36. 36. Built in Slot Types
  37. 37. Single word slot ISeeIntent {Animal} ISeeIntent I have a {Animal} ISeeIntent I have an {Animal}
  38. 38. LITERAL!? ISeeIntent I have a {Animal} ISeeIntent I have an {Animal} “I have a red hot chili pepper!” Animal = red hot chilly pepper
  39. 39. How do I receive my slot? if(event.request.intent.slots.Color.value) { myColor = this.event.request.intent.slots.Color.value; say = "you said ” + myColor; } else { say = "you must provide a color"; }
  40. 40. alexa-sdk
  41. 41. AWS Lambda Console
  42. 42. alexa-sdk • Included with the Fact Skill blueprint • Supports saving your session attributes in DynamoDB
  43. 43. QUESTIONS? ASK

×