Top Banner
Building Alexa Skills for Amazon Echo AMAZON DEVELOPER DAY DAVE ISBITSKI PRINCIPAL EVANGELIST, AMAZON @TheDaveDev [email protected]
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Building Voice Apps & Experiences For Amazon Echo

Building Alexa Skills for Amazon Echo AMAZON DEVELOPER DAY

DAVE ISBITSKIPRINCIPAL EVANGELIST, AMAZON

@TheDaveDev

[email protected]

Page 2: Building Voice Apps & Experiences For Amazon Echo

10:00am - 10:30am An Overview of the Amazon Devices and Services for Mobile Developers

10:30am - 11:45am Building Alexa Skills for Amazon Echo

Noon – 3:45pmApp Hours / Open Hack

3:45pm-4:30pmPresentations

4:30pmRaffle

DEVELOPER DAY AGENDA

Page 3: Building Voice Apps & Experiences For Amazon Echo

DEVELOPER DAY AGENDA

Page 4: Building Voice Apps & Experiences For Amazon Echo

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 Blackberry 10 and millions of

other Android devices, including HTC, LG, Motorola, and Samsung phones to 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

Page 5: Building Voice Apps & Experiences For Amazon Echo

What is Amazon Echo?

Page 6: Building Voice Apps & Experiences For Amazon Echo

Alexa, Hello.

Page 7: Building Voice Apps & Experiences For Amazon Echo
Page 8: Building Voice Apps & Experiences For Amazon Echo
Page 9: Building Voice Apps & Experiences For Amazon Echo

Amazon Echo App

Page 10: Building Voice Apps & Experiences For Amazon Echo
Page 11: Building Voice Apps & Experiences For Amazon Echo

Alexa Skills Kit (ASK) Overview

Page 12: Building Voice Apps & Experiences For Amazon Echo

ALEXA SKILLS KIT (ASK)https://developer.amazon.com/ask

Page 13: Building Voice Apps & Experiences For Amazon Echo

ALEXA VOICE SERVICE (AVS)https://developer.amazon.com/avs

Page 14: Building Voice Apps & Experiences For Amazon Echo

THE ALEXA FUNDhttps://developer.amazon.com/alexafund

Page 15: Building Voice Apps & Experiences For Amazon Echo

Alexa is the cloud service used by Amazon Echo

The Alexa Skills Kit allows developers to build new Skills (new voice experiences) for Echo

ALEXA SKILLS KIT

Page 16: Building Voice Apps & Experiences For Amazon Echo

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

Page 17: Building Voice Apps & Experiences For Amazon Echo

Creating your ownALEXA SKILLSAlexa Skills have two parts:

Configuration data in Amazon Developer Portal

Hosted Service responding to user requests

Page 18: Building Voice Apps & Experiences For Amazon Echo

Alexa Skills Kit Architecture

Amazon

Alexa

Service

Developer’s Application

Service

Amazon’s Developer

PortalApplication, 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 serviceAudio responses are rendered on-device

Text response and/or GUI card data is returned

Page 19: Building Voice Apps & Experiences For Amazon Echo

Sample Interactions ofALEXA SKILLSOne and done

“Alexa, start Astrology and get the Pisces horoscope.”[Horoscope Provided]

Conversation“Alexa, start Astrology”[“What’s your sign?”]“Pisces”[Horoscope Provided]

Page 20: Building Voice Apps & Experiences For Amazon Echo

DemoConfiguring a new Alexa Skill

Page 21: Building Voice Apps & Experiences For Amazon Echo

Building an Alexa SkillHOSTED SERVICE• Adheres to ASK service interface• Uses HTTP over SSL/TLS on port 443• Must be Internet-accessible• Presents a trusted certificate matching

domain name– Can use self-signed certificate for

development– Trusted certificate required for

certification

Page 22: Building Voice Apps & Experiences For Amazon Echo

Building an Alexa SkillHOSTED 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.

Page 23: Building Voice Apps & Experiences For Amazon Echo

Building an Alexa SkillHOSTED 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}

Page 24: Building Voice Apps & Experiences For Amazon Echo

The Amazon Alexa ServiceWILL POST EVENTSLaunchRequest

Maps to onLaunch() and occurs when the user launches the app without specifying what they want

IntentRequestMaps to onIntent() and occurs when when the user specifies an intent

SessionEndedRequestMaps to OnSessionEnded() and when the user ends the session

Page 25: Building Voice Apps & Experiences For Amazon Echo

DemoHelloWorld Speechlet Alexa Skill - Java

Page 26: Building Voice Apps & Experiences For Amazon Echo

Alexa ServiceExamining the JSON Requests from

Page 27: Building Voice Apps & Experiences For Amazon Echo
Page 28: Building Voice Apps & Experiences For Amazon Echo

Handling Amazon Alexa ServiceREQUESTS• 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

Page 29: Building Voice Apps & Experiences For Amazon Echo
Page 30: Building Voice Apps & Experiences For Amazon Echo

DemoMy Colors Alexa Skill – JavaScript and Node JS

Page 31: Building Voice Apps & Experiences For Amazon Echo

31

http://bit.ly/bmaboston2

Page 32: Building Voice Apps & Experiences For Amazon Echo

32

Building Alexa Skills for Amazon Echo AMAZON DEVELOPER DAY

DAVE ISBITSKIPRINCIPAL EVANGELIST, AMAZON

@TheDaveDev

[email protected]

Page 33: Building Voice Apps & Experiences For Amazon Echo

10:00am - 10:30am An Overview of the Amazon Devices and Services for Mobile Developers

10:30am - 11:45am Building Alexa Skills for Amazon Echo

Noon – 4:30pmApp Hours / Open Hack

4:30pmRaffle

DEVELOPER DAY AGENDA