Amazon Alexa - Introduction & Custom Skills
-
Upload
andre-mare -
Category
Technology
-
view
130 -
download
2
Transcript of Amazon Alexa - Introduction & Custom Skills
Amazon AlexaIntroduction & Custom Skills
Overview
Learning to code an Alexa Skill in less than an
hour.
• Amazon Alexa• Amazon Echo & Dot• Amazon Alexa Commands• Alexa Skills Kit• Utterances, Slots & Intents• Events• Demo: Mister Quote• Questions
Amazon Alexa• Intelligent Personal Assistant• Amazon’s Cloud-based Voice Service• Provide Capabilities / Skills– Play Music– Answer General Questions– Set Alarm / Timer– Read the news– Play Audible Books
Amazon Echo & Dot• Always on, always connected, hands free device.• Connects to Amazon Alexa.• Continually learns and adapts to your speech
patterns. • Echo has 7 microphones & beam forming tech.• Can hear you across a room.• Just say wake up word: “Alexa”.
Amazon Alexa CommandsAmazon Commands: • Alexa, what is the weather in London?• Alexa, who is Steve Jobs?• Alexa, set time for 3 seconds.
Custom Skills:• Alexa, ask AllRecipes for a chicken recipe.• Alexa, open Capital One.
Alexa Skills Kit (ASK)
• Used to Build & Publish 3rd party skills• Collection of – Self-Service API’s – Tools– Documentation– Tutorials & Samples
• Use the “Smart Home Skill API” for – Cloud controlled lighting& thermostat devices
Alexa Skills
Image: Big Nerd Ranchhttps://developer.amazon.com/alexa-skills-kit/big-nerd-ranch/alexa-architecture-and-configuration
Alexa Skills Kit Architecture
Image: Slideshare – AmazonWebServiceshttps://www.slideshare.net/AmazonWebServices/mbl308-extending-alexas-builtin-skills-see-how-capital-one-did-it
Skill Interface: Utterances
• Map phrases user speak to intents• Lines in a plain text file
• Format– {IntentName} sample utterance– {IntentName} sample utterance {SlotName}
Skill Interface: Slots Types
Standard Slot Types:• Alexa Skills Kit defines several slot types.• Numbers, Dates & Times• List of Items
Custom Slot Types:• Defines a list of possible values.• Text File
Standard Slots Types
Skill Interface: Intents
• You define interactions for your skill through Intents
• Intents are defined in JSON structure
Standard Built-in Intents
Standard Built-in Intents Common Utterances
AMAZON.RepeatIntent Repeat, Say that again
AMAZON.HelpIntent Help, Help me, Can you help me
AMAZON.StopIntent Stop, off, Shut up
AMAZON.CancelIntent Cancel, Never mind, Forget it
AMAZON.YesIntent Yes, Yes please, Sure
AMAZON.NoIntent No, No thanks
• Standard Intents used for common actions• These intents do not use slots
Hosted Service
Amazon Alexa Service post events:• LaunchRequest– Occurs when user launches skill without
specifying what they want.• IntentRequest– Occurs when the user specifies an intent.
• SessionEndedRequest– Occurs when the user ends the session.
Mister Quote
DEMO
Mister Quote
• Skill providing quotes of famous people.
Alexa, ask Mister Quote to give a quote of Nelson Mandela.
We can't afford to be killing one another.
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote - Interface
• Sample Utterances– Ask for a random quote– Ask for a quote of famous person• Custom Slot: famousPerson
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Custom Slot
• Custom Slot List– Text file containing list of valid values
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Intent
• JSON structure defining interactions– Random Quote– Specific Quote of Famous Person– Amazon Built-in Interactions
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Service
• Uses the Alexa-SDK
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Service
• Constants File containing Application ID
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Service
• Quote File containing functions and quotes
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Service
• Handler file contains all Intent Handlers
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Deploy
Developer Portal{Interface}
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Mister Quote – Run
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
Alexa, ask Mister Quote to give a quote of Nelson Mandela.
We can't afford to be killing one another.
Alexa - Questions