Skip to content

Instantly share code, notes, and snippets.

@mdang
Last active December 20, 2019 15:36
Show Gist options
  • Save mdang/5e694888a4783c8f328daa578fe9f36f to your computer and use it in GitHub Desktop.
Save mdang/5e694888a4783c8f328daa578fe9f36f to your computer and use it in GitHub Desktop.
Lesson: Alexa

Alexa

Prerequisites

How Alexa Works

When a user speaks to an Alexa-enabled device, the speech is streamed to the Alexa service in the cloud. Alexa recognizes the speech, determines what the user wants, and then sends a structured request to the particular skill that can fulfill the user’s request. All speech recognition and conversion is handled by Alexa in the cloud. Every Alexa skill has an interaction model defining the words and phrases users can say to make the skill do what they want. The type of skill you build dictates the interaction model that Alexa uses to communicate with your users.

Alexa Skills Kit

Skill Types

  • Custom Skills
  • Smart Home Skill API - The Smart Home Skill API enables you to create skills to control cloud-connected devices
  • Flash Briefing Skill API - A Flash Briefing Skill provides content for a customer’s Flash Briefing, and so when you create a Flash Briefing skill, you have a chance for your original content to reach customers on a daily basis.

Custom Skills

  1. Define intents (Requests the skills can handle)
  • Look up tide information
  • Order a pizza
  • Request a taxi
  1. The words users say to make (or invoke) those requests. This is the interaction model, and it provides the voice user interface by which users communicate with the skill.
  • Get high tide for Seattle (this phrase would be mapped to a TideRequest intent)
  • Order a large pepperoni pizza (this phrase would be mapped to an OrderPizza intent)
  • Order a car (this phrase would be mapped to an OrderCar intent)
  1. The name Alexa uses to identify your skill, called the invocation name. Users include this when making a request. For example, the skill for looking up tides could be called “tide pooler”.

User: get high tide for Seattle from Tide Pooler

Hosting Custom Skills

Create a Custom Skill

1. Design a Voice User Interface

2. Set up the Skill

3. Write and Test the Code for Your Skill

4. Submit the Skill

Code Samples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment