- AWS Account
- Create a Developer Portal Account
- Alexa-enabled device for testing (Optional)
- Companion App - http://alexa.amazon.com/
- Millions of devices sold to date (Estimated 11 million)
- Top sellers on Amazon during Christmas 2016
- Companies need developers to build out skills (e.g. Starbucks)
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.
- 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.
Understanding the Different Types of Skills
- Define
intents
(Requests the skills can handle)
- Look up tide information
- Order a pizza
- Request a taxi
- 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)
- 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
- Defining the Voice User Interface
- Voice Design Best Practices
- Understanding How Users Interact with Skills
Create your intent schema. This is a JSON structure which declares the set of requests (“intents”) your service can accept and handle.
// IntentSchema.json
{
"intents": [
{
"intent": "HelloWorldIntent"
},
{
"intent": "AMAZON.HelpIntent"
}
]
}
Intents can optionally support named parameters with slots
. Alexa will pass these values to the Lambda function when invoked.
{
"intents": [
{
"intent": "GetHoroscope",
"slots": [
{
"name": "Sign",
"type": "LIST_OF_SIGNS"
},
{
"name": "Date",
"type": "AMAZON.DATE"
}
]
},
{
"intent": "GetLuckyNumbers"
}
]
}
You can then access slot
variables like so within Node:
intent.slots.Sign.value
Create a set of sample utterances that map to your intents. These are the phrases users say when interacting with your skill.
HelloWorldIntent say hello
HelloWorldIntent say hello world
HelloWorldIntent hello
HelloWorldIntent say hi
HelloWorldIntent say hi world
HelloWorldIntent hi
HelloWorldIntent how are you
If you have slots defined, you can create a sample utterance like so:
GetHoroscopeIntent what will the horoscope for {Sign} be on {Date}