Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Amazon Alexa - Introduction & Custom Skills
-
Upload
andre-mare -
Category
Technology
-
view
130 -
download
2
Transcript of Amazon Alexa - Introduction & Custom Skills
![Page 1: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/1.jpg)
Amazon AlexaIntroduction & Custom Skills
![Page 2: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/2.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/3.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/5.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/6.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/8.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/10.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/11.jpg)
Standard Slots Types
![Page 12: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/12.jpg)
Skill Interface: Intents
• You define interactions for your skill through Intents
• Intents are defined in JSON structure
![Page 13: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/13.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/14.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/15.jpg)
Mister Quote
DEMO
![Page 16: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/16.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/17.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/18.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/19.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/20.jpg)
Mister Quote – Service
• Uses the Alexa-SDK
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
![Page 21: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/21.jpg)
Mister Quote – Service
• Constants File containing Application ID
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
![Page 22: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/22.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/23.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/24.jpg)
Mister Quote – Deploy
Developer Portal{Interface}
Source Code: https://github.com/Code2Bits/Alexa-Skills-Samples/
![Page 25: Amazon Alexa - Introduction & Custom Skills](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/25.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062401/58ec99271a28ab503d8b463f/html5/thumbnails/26.jpg)
Alexa - Questions