how to create a voice – enabled iot solution for alexa
TRANSCRIPT
![Page 1: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/1.jpg)
How to create a voice-enabled IoT solu5on for Alexa
JohnChang
TechnologyEvangelistOctober2016
![Page 2: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/2.jpg)
What is Amazon Echo?
![Page 3: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/3.jpg)
Alexa, Hello.
![Page 4: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/4.jpg)
![Page 5: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/5.jpg)
![Page 6: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/6.jpg)
Amazon Alexa app
![Page 7: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/7.jpg)
![Page 8: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/8.jpg)
![Page 9: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/9.jpg)
Capital One banking with voice control
![Page 10: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/10.jpg)
Amazon Alexa and GE Appliances
![Page 11: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/11.jpg)
Alexa Skills Kit (ASK) Overview
![Page 12: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/12.jpg)
ALEXA SKILLS KIT (ASK) https://developer.amazon.com/ask
![Page 13: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/13.jpg)
ALEXA VOICE SERVICE (AVS) https://developer.amazon.com/avs
![Page 14: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/14.jpg)
THE ALEXA FUND https://developer.amazon.com/alexafund
![Page 15: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/15.jpg)
Creating your own ALEXA SKILLS Alexa skills have two parts: Configuration data in Amazon Developer Portal Hosted service responding to user requests
![Page 16: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/16.jpg)
Alexa architecture
Amazon Alexa
Service GUI cards are rendered in the Amazon Alexa app
User audio is streamed to the service
Audio responses are rendered on device
![Page 17: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/17.jpg)
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 Alexa app
User audio is streamed to the service
Audio responses are rendered on device
Text response and/or GUI card data is returned
![Page 18: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/18.jpg)
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]
![Page 19: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/19.jpg)
Demo Configuring a new Alexa skill
![Page 20: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/20.jpg)
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 trusted certificate matching
domain name – Can use self-signed certificate for
development – Trusted certificate required for
certification
![Page 21: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/21.jpg)
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.
![Page 22: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/22.jpg)
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}
![Page 23: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/23.jpg)
Amazon Alexa service WILL POST EVENTS LaunchRequest
Maps to onLaunch() and occurs when the users launch the app without specifying what they want
IntentRequest Maps to onIntent() and occurs when the user specifies an intent
SessionEndedRequest Maps to OnSessionEnded() and occurs when the user ends the session
![Page 24: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/24.jpg)
![Page 25: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/25.jpg)
Alexa Service Examining JSON requests from
![Page 26: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/26.jpg)
![Page 27: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/27.jpg)
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
![Page 28: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/28.jpg)
Testing your skill service simulator
• Enabled once a skill has been configured in the developer portal
• Use spoken utterances to generate ad-hoc results
• Use JSON to verify requests • Combine with AWS Lambda unit
tests to verify both client and service side Alexa end points
![Page 29: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/29.jpg)
Demo Alexa Skill – JavaScript and Node JS
![Page 30: How to create a Voice – Enabled IoT solution for Alexa](https://reader034.vdocuments.us/reader034/viewer/2022051520/5883116a1a28ab31068b5895/html5/thumbnails/30.jpg)
Thank you!