Building Alexa Skills for Amazon Echo
AMAZON DEVELOPER DAY
DAVE ISBITSKI
PRINCIPAL EVANGELIST, AMAZON
@TheDaveDev
isbitski@amazon.com
10:00am - 10:30am
An Overview of the AmazonDevices and Services for Mobile Developers
10:30am - 11:45am
Building Alexa Skills for AmazonEcho
Noon – 3:45pm
App Hours / Open Hack
3:45pm-4:30pm
Presentations
4:30pm
Raffle
DEVELOPER DAY AGENDA
DEVELOPER DAY AGENDA
Amazon Appstore Ecosystem
The Appstore is integrated across
the Amazon ecosystem
• Over 400,000 apps in the Amazon Appstore
• Only place for Apps on Fire Tablets, Fire TV,
and Fire phone
• Preloaded on Blackberry10 and millions of
otherAndroid devices, includingHTC, LG,
Motorola, and Samsung phonesto name a
few, as well as Samsung and LG tablets.
By making your app available on the Amazon Appstore, you’ll have the opportunity to
reach millions of Android customers in 236 countries and territories worldwide
Android Phones &
Tablets
Fire phoneFire Tablets
Fire TV &
Fire TV Stick
Blackberry
What is Amazon Echo?
Alexa, Hello.
Amazon Echo App
Alexa Skills Kit (ASK) Overview
ALEXA SKILLS KIT (ASK)
https://developer.amazon.com/ask
ALEXA VOICE SERVICE (AVS)
https://developer.amazon.com/avs
THE ALEXA FUND
https://developer.amazon.com/alexafund
Alexa is the cloud service used by AmazonEcho
The Alexa Skills Kit allows developers to build new Skills (new
voice experiences) for Echo
ALEXA SKILLS KIT
Alexa Architecture
Amazon
Alexa
ServiceGUI cards are
rendered in the
Amazon Echo app
User audio is
streamed to the
service
Audio responses
are rendered on-
device
Creating your own
ALEXA SKILLS
Alexa Skills have two parts:
Configuration data in Amazon Developer
Portal
Hosted Service respondingto user
requests
Alexa Skills Kit Architecture
Amazon
Alexa
Service
Developer’s
Application
Service
Amazon’s
Developer
Portal
Application, intents, sample
data Developer Service URL
EndPoint
Configured through portal
User intents and
arguments are sent to
the developer service
GUI cards are
rendered in the
Amazon Echo app
User audio is streamed
to the service
Audio responses are
rendered on-device
Text response and/or
GUI card data is
returned
Sample Interactions of
ALEXA SKILLS
One and done
“Alexa, start Astrology and get the Pisces
horoscope.”
[Horoscope Provided]
Conversation
“Alexa, start Astrology”
[“What’s your sign?”]
“Pisces”
[Horoscope Provided]
Demo
Configuring a new Alexa Skill
Building an Alexa Skill
HOSTED SERVICE
• Adheres to ASK service interface
• Uses HTTP over SSL/TLS on port 443
• Must be Internet-accessible
• Presents a trustedcertificate matching
domain name
– Can use self-signed certificate for
development
– Trusted certificate required for
certification
Building an Alexa Skill
HOSTED SERVICE
• You define interactions for your Voice
App through Intent Schemas
• Each intent consists of two fields. The
intent field gives the name of the intent.
The slots field lists the slots associated
with that intent.
• Slots can also included types such as
LITERAL,NUMBER,DATE,etc.
Building an Alexa Skill
HOSTED SERVICE
• The mappings between intents and the
typical utterances that invoke those
intents are provided in a tab-separated
text document of sample utterances.
• Each possible phrase is assigned to one
of the defined intents.
• GetHoroscope what is the horoscope for
{pisces|Sign}
• GetHoroscope what will the horoscope for
{leo|Sign} be {next tuesday|Date}
The Amazon Alexa Service
WILL POST EVENTS
LaunchRequest
Maps to onLaunch() and occurs when the
user launches the app without specifying
what they want
IntentRequest
Maps to onIntent() and occurs when when
the user specifies an intent
SessionEndedRequest
Maps to OnSessionEnded() and when the
user ends the session
Demo
HelloWorld Speechlet Alexa Skill - Java
Alexa Service
Examining the JSON Requests from
Handling Amazon Alexa Service
REQUESTS
• You will need to handle POST requests to
your service over port 443 and parse the
JSON
• You need to check the session variable to see
if the user started a new session or if request
is from existing one
• Requests always Include a type,requestId and
timestamp
• requestId maps directly to LaunchRequest,
IntentRequest and SessionEndedRequest
Demo
My Colors Alexa Skill – JavaScript and Node JS
31
http://bit.ly/bmaboston2
32
Building Alexa Skills for Amazon Echo
AMAZON DEVELOPER DAY
DAVE ISBITSKI
PRINCIPAL EVANGELIST, AMAZON
@TheDaveDev
isbitski@amazon.com
10:00am - 10:30am
An Overview of the AmazonDevices and Services for Mobile Developers
10:30am - 11:45am
Building Alexa Skills for AmazonEcho
Noon – 4:30pm
App Hours / Open Hack
4:30pm
Raffle
DEVELOPER DAY AGENDA

Building Voice Apps & Experiences For Amazon Echo

  • 1.
    Building Alexa Skillsfor Amazon Echo AMAZON DEVELOPER DAY DAVE ISBITSKI PRINCIPAL EVANGELIST, AMAZON @TheDaveDev isbitski@amazon.com
  • 2.
    10:00am - 10:30am AnOverview of the AmazonDevices and Services for Mobile Developers 10:30am - 11:45am Building Alexa Skills for AmazonEcho Noon – 3:45pm App Hours / Open Hack 3:45pm-4:30pm Presentations 4:30pm Raffle DEVELOPER DAY AGENDA
  • 3.
  • 4.
    Amazon Appstore Ecosystem TheAppstore is integrated across the Amazon ecosystem • Over 400,000 apps in the Amazon Appstore • Only place for Apps on Fire Tablets, Fire TV, and Fire phone • Preloaded on Blackberry10 and millions of otherAndroid devices, includingHTC, LG, Motorola, and Samsung phonesto name a few, as well as Samsung and LG tablets. By making your app available on the Amazon Appstore, you’ll have the opportunity to reach millions of Android customers in 236 countries and territories worldwide Android Phones & Tablets Fire phoneFire Tablets Fire TV & Fire TV Stick Blackberry
  • 5.
  • 6.
  • 9.
  • 11.
    Alexa Skills Kit(ASK) Overview
  • 12.
    ALEXA SKILLS KIT(ASK) https://developer.amazon.com/ask
  • 13.
    ALEXA VOICE SERVICE(AVS) https://developer.amazon.com/avs
  • 14.
  • 15.
    Alexa is thecloud service used by AmazonEcho The Alexa Skills Kit allows developers to build new Skills (new voice experiences) for Echo ALEXA SKILLS KIT
  • 16.
    Alexa Architecture Amazon Alexa ServiceGUI cardsare rendered in the Amazon Echo app User audio is streamed to the service Audio responses are rendered on- device
  • 17.
    Creating your own ALEXASKILLS Alexa Skills have two parts: Configuration data in Amazon Developer Portal Hosted Service respondingto user requests
  • 18.
    Alexa Skills KitArchitecture Amazon Alexa Service Developer’s Application Service Amazon’s Developer Portal Application, intents, sample data Developer Service URL EndPoint Configured through portal User intents and arguments are sent to the developer service GUI cards are rendered in the Amazon Echo app User audio is streamed to the service Audio responses are rendered on-device Text response and/or GUI card data is returned
  • 19.
    Sample Interactions of ALEXASKILLS One and done “Alexa, start Astrology and get the Pisces horoscope.” [Horoscope Provided] Conversation “Alexa, start Astrology” [“What’s your sign?”] “Pisces” [Horoscope Provided]
  • 20.
  • 21.
    Building an AlexaSkill HOSTED SERVICE • Adheres to ASK service interface • Uses HTTP over SSL/TLS on port 443 • Must be Internet-accessible • Presents a trustedcertificate matching domain name – Can use self-signed certificate for development – Trusted certificate required for certification
  • 22.
    Building an AlexaSkill HOSTED SERVICE • You define interactions for your Voice App through Intent Schemas • Each intent consists of two fields. The intent field gives the name of the intent. The slots field lists the slots associated with that intent. • Slots can also included types such as LITERAL,NUMBER,DATE,etc.
  • 23.
    Building an AlexaSkill HOSTED SERVICE • The mappings between intents and the typical utterances that invoke those intents are provided in a tab-separated text document of sample utterances. • Each possible phrase is assigned to one of the defined intents. • GetHoroscope what is the horoscope for {pisces|Sign} • GetHoroscope what will the horoscope for {leo|Sign} be {next tuesday|Date}
  • 24.
    The Amazon AlexaService WILL POST EVENTS LaunchRequest Maps to onLaunch() and occurs when the user launches the app without specifying what they want IntentRequest Maps to onIntent() and occurs when when the user specifies an intent SessionEndedRequest Maps to OnSessionEnded() and when the user ends the session
  • 25.
  • 26.
    Alexa Service Examining theJSON Requests from
  • 28.
    Handling Amazon AlexaService REQUESTS • You will need to handle POST requests to your service over port 443 and parse the JSON • You need to check the session variable to see if the user started a new session or if request is from existing one • Requests always Include a type,requestId and timestamp • requestId maps directly to LaunchRequest, IntentRequest and SessionEndedRequest
  • 30.
    Demo My Colors AlexaSkill – JavaScript and Node JS
  • 31.
  • 32.
    32 Building Alexa Skillsfor Amazon Echo AMAZON DEVELOPER DAY DAVE ISBITSKI PRINCIPAL EVANGELIST, AMAZON @TheDaveDev isbitski@amazon.com
  • 33.
    10:00am - 10:30am AnOverview of the AmazonDevices and Services for Mobile Developers 10:30am - 11:45am Building Alexa Skills for AmazonEcho Noon – 4:30pm App Hours / Open Hack 4:30pm Raffle DEVELOPER DAY AGENDA