amazon alexa - introduction & custom skills

26
Amazon Alexa Introduction & Custom Skills

Upload: andre-mare

Post on 11-Apr-2017

130 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Amazon Alexa - Introduction & Custom Skills

Amazon AlexaIntroduction & Custom Skills

Page 2: Amazon Alexa - Introduction & 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

Page 3: Amazon Alexa - Introduction & Custom Skills

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

Page 4: Amazon Alexa - Introduction & Custom Skills

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”.

Page 5: Amazon Alexa - Introduction & Custom Skills

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.

Page 6: Amazon Alexa - Introduction & Custom Skills

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

Page 7: Amazon Alexa - Introduction & Custom Skills

Alexa Skills

Image: Big Nerd Ranchhttps://developer.amazon.com/alexa-skills-kit/big-nerd-ranch/alexa-architecture-and-configuration

Page 8: Amazon Alexa - Introduction & Custom Skills

Alexa Skills Kit Architecture

Image: Slideshare – AmazonWebServiceshttps://www.slideshare.net/AmazonWebServices/mbl308-extending-alexas-builtin-skills-see-how-capital-one-did-it

Page 9: Amazon Alexa - Introduction & Custom Skills

Skill Interface: Utterances

• Map phrases user speak to intents• Lines in a plain text file

• Format– {IntentName} sample utterance– {IntentName} sample utterance {SlotName}

Page 10: Amazon Alexa - Introduction & Custom Skills

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

Page 11: Amazon Alexa - Introduction & Custom Skills

Standard Slots Types

Page 12: Amazon Alexa - Introduction & Custom Skills

Skill Interface: Intents

• You define interactions for your skill through Intents

• Intents are defined in JSON structure

Page 13: Amazon Alexa - Introduction & Custom Skills

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

Page 14: Amazon Alexa - Introduction & Custom Skills

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.

Page 15: Amazon Alexa - Introduction & Custom Skills

Mister Quote

DEMO

Page 16: Amazon Alexa - Introduction & Custom Skills

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/

Page 17: Amazon Alexa - Introduction & Custom Skills

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/

Page 18: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Custom Slot

• Custom Slot List– Text file containing list of valid values

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 19: Amazon Alexa - Introduction & Custom Skills

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/

Page 20: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Service

• Uses the Alexa-SDK

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 21: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Service

• Constants File containing Application ID

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 22: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Service

• Quote File containing functions and quotes

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 23: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Service

• Handler file contains all Intent Handlers

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 24: Amazon Alexa - Introduction & Custom Skills

Mister Quote – Deploy

Developer Portal{Interface}

Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/

Page 25: Amazon Alexa - Introduction & Custom Skills

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.

Page 26: Amazon Alexa - Introduction & Custom Skills

Alexa - Questions