Build Voice-Enabled Experiences with Alexa

5,405 views

Published on

Build Voice-Enabled Experiences with Alexa

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Build Voice-Enabled Experiences with Alexa

  1. 1. Build Voice-Enabled Experiences with Alexa @AlexaDevs
  2. 2. Meet the Alexa Family
  3. 3. Meet Alexa The cloud-based voice service that powers devices like Amazon Echo and Echo Dot
  4. 4. alexa.design/video
  5. 5. The Amazon Alexa Service Supported by two powerful frameworks that leverage public APIs Lives In the Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Improving
  6. 6. The Amazon Alexa Service Supported by two powerful frameworks that leverage open APIs Lives In the Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Improving Alexa Skills Kit (ASK) Create Great Content ASK is how you connect to your consumer
  7. 7. The Amazon Alexa Service Supported by two powerful frameworks that leverage open APIs Lives In the Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Improving Alexa Skills Kit (ASK) Create Great Content ASK is how you connect to your consumer Alexa Voice Service (AVS) Unparalleled Distribution AVS allows your content to be everywhere
  8. 8. Skills built using ASK Tools that make it fast & easy for you to build skills
  9. 9. Alexa, ask Lyft for a Lyft Line to work
  10. 10. Alexa, tell Starbucks start my order
  11. 11. Alexa has skills Amazon.com/skills
  12. 12. Alexa Resources - cameras out! bit.ly/alexaquickstart github.com/alexa developer.amazon.com/ask aws.amazon.com
  13. 13. Remember to Check-In • Ask the instructor for the link • You’ll get a confirmation email with details to earn free perks from Amazon
  14. 14. I. Demo “Alexa, Open Space Facts”
  15. 15. Alexa, open space facts Wake Word Starting Phrase Skill invocation Name
  16. 16. II. Let’s Build Objective: Create a skill that delivers random facts or quotes
  17. 17. What You Will Learn • Voice User Interface (VUI) Design • Intents & Utterances • one-shot vs multi-turn interactions • SSML/Speechcons • AWS Lambda • Skill Certification
  18. 18. Two sides to an Alexa skill Alexa skills have two parts – a front-end and a back-end
  19. 19. Creating an Alexa Skill Voice User Interface Programming Logic +
  20. 20. Creating an Alexa Skill + developer.amazon.com aws.amazon.com
  21. 21. Creating an Alexa Skill
  22. 22. Creating an Alexa Skill developer.amazon.com
  23. 23. Creating an Alexa Skill aws.amazon.com
  24. 24. Creating an Alexa Skill + developer.amazon.com
  25. 25. Alexa Skill Templates github.com/alexa
  26. 26. Alexa Project Structure /SpeechAssets /IntentSchema.json /SampleUtterances.txt /src /index.js
  27. 27. Fact Skill Template alexa.design/fact
  28. 28. Open a New Browser Window 1. developer.amazon.com/alexa 2. aws.amazon.com 3. github.com/alexa with these three tabs:
  29. 29. Echosim.io Let’s test our skill
  30. 30. Alexa, open space facts open, begin, start, launch, ask, tell Wake Word Starting Phrase Skill invocation Name
  31. 31. Alexa, ask space facts for trivia UtteranceWake Word Skill invocation NameStarting Phrase
  32. 32. Alexa, ask space facts for trivia tell me something give me information a fact give me trivia UtteranceWake Word Skill invocation NameStarting Phrase
  33. 33. III. How it works. Utterance to intents.
  34. 34. Audio Cards Request Response
  35. 35. Speech Recognition
  36. 36. Automatic Speech Recognition fȯr tē tīmz
  37. 37. Automatic Speech Recognition fȯr tē tīmz Forty Times? 40x
  38. 38. Automatic Speech Recognition fȯr tē tīmz Forty Times? 40x For Tea Times?
  39. 39. Automatic Speech Recognition fȯr tē tīmz Forty Times? For Tea Times? For Tee Times? 40x
  40. 40. Automatic Speech Recognition fȯr tē tīmz Forty Times? For Tea Times? Four Tee Times? 40x
  41. 41. NLU engine to the rescue Natural Language Understanding
  42. 42. Sample Utterances In order to map user input to a behavior, we provide training data, for each intent.
  43. 43. Intent Schema (JSON) An array of intents. Each intent is a behavior for your skill.
  44. 44. Inputs & Outputs User Audio in. Intents & Slots out.
  45. 45. Wake word detection Signal processing Beam forming Request Response
  46. 46. Audio Utterances JSON Intents Request Response
  47. 47. Response Request Text to speech SSML, streaming audio JSON
  48. 48. Intents & Utterances
  49. 49. Intents are the Connection
  50. 50. Intents are the Connection - JSON
  51. 51. Intents are the Connection - Code
  52. 52. Built-in Intents A library of intents for common actions. Amazon provides training data, but they can be augmented. AMAZON.CancelIntent AMAZON.HelpIntent AMAZON.StopIntent AMAZON.NextIntent AMAZON.NoIntent AMAZON.RepeatIntent AMAZON.StartOverIntent AMAZON.ShuffleOnIntent AMAZON.YesIntent REQUIRED FOR CERTIFICATION
  53. 53. Communicating with the endpoint Your endpoint needs to receive and react to a JSON object
  54. 54. The Endpoint Must be Internet-accessible Adhere to ASK service interface - JSON Web service or AWS Lambda Uses HTTP over SSL/TLS - port 443
  55. 55. Communicating with the Endpoint Request body: • session: Information about the current conversation • request: Describes the user input
  56. 56. Communicating with the Endpoint Response body: • outputSpeech: Alexa’s response • card: (optional) graphical response • reprompt: (optional) reminder • shouldEndSession: used to end or keep session open
  57. 57. Types of requests The journey from user utterance to intents.
  58. 58. Alexa, open space facts LaunchRequest
  59. 59. Alexa, exit SessionEndedRequest
  60. 60. IntentRequest : GetNewFactIntent Alexa, ask space facts for trivia
  61. 61. Alexa SDK: emit, ask, tell
  62. 62. Ask vs Tell Tell: Ask: Present data to user, ends conversation (session). Wait for user input, doesn’t end conversation (session).
  63. 63. Emit – output speech/event Speech: Event: A way to route behavior in your code.
  64. 64. Alexa Resources - cameras out! bit.ly/alexaquickstart github.com/alexa developer.amazon.com/ask aws.amazon.com
  65. 65. Remember to Check-In • Ask the instructor for the link • You’ll get a confirmation email with details to earn free perks from Amazon

×