4. ... and Rafał Hryniewski
@r_hryniewskifb.me/hryniewskinet
5.
6.
7.
8. Agenda
• We’ve met
• Short history of voice recognition
• Here and now
• Why Alexa?
• First contact
• Working with voice
• Session, dialogs and other tools
• Where’s money in that
• Connecting with existing solution
10. Long time ago in sci-fi realm
Fot. https://www.flickr.com/photos/ikrichter/20355251321
11. 1922 – Radio Rex
• Recognized it’s name
Fot. https://www-03.ibm.com/ibm/history/exhibits/specialprod1/specialprod1_7.html
12. 1961 – IBM Shoebox
• Recognized 16 words (‘plus’,
‘minus’ etc.) and digits.
• Basically voice controlled
calculator
• IBM demonstration:
https://www.youtube.com/wat
ch?v=rQco1sa9AwU
Fot. https://www-03.ibm.com/ibm/history/exhibits/specialprod1/specialprod1_7.html
13. Few others
• 1976 – DARPA’s Harpy – Recognized 1011 words
• 1990 – Dragon Dictate – Recognized 5000, allowed for
controlling PC with voice
• 2003 – Voice Recognition for Office XP
14. 2011 - Apple Siri 2012 - Google Now
2014 - Microsoft Cortana 2014 - Amazon Alexa
15. Platforms today
• Alexa
• Siri
• Cortana
• Google Now
• Others
https://en.wikipedia.org/wiki/Category:Virtual_assistants
17. Devices
Siri Google Now Cortana Alexa
Apple Home
Pod
Google Home
Mini
Harman Cardon
Invoke
Echo Dot
349$ 49$ 99$ 49$
18. Apple Siri
• Programming only in Swift
and Objective-C
• Expensive and not very good
device
Fot. https://giphy.com/gifs/no-cat-nR4L10XlJcSeQ
19. Google Now
• I’m not familiar with Android
Environment
Fot. https://giphy.com/gifs/W5YVAfSttCqre
20. Microsoft Cortana
• No devices by Microsoft
• I’ve trusted them with
Windows Phone before
Fot. https://giphy.com/gifs/reaction-imgfave-RddAJiGxTPQFa
21. Amazon Alexa
• I could use C#
• Cloud based
• Easy integration with any
existing app
• A lot of devices
• Growing platform
Fot. https://giphy.com/gifs/people-hd-gifsremastered-10Jpr9KSaXLchW
22. Other Devices
Echo Echo Plus Echo Spot Echo Show
Better sound
quality
Built-in smart
home hub
Small display Better display
and sound
99$ 150$ 130$ 230$
23. And Echo Look
• 200$
• Take pictures and videos using voice
commands
• Allows to categorize your wardrobe!
• Gives fashion advice based on machine
learning!!!
26. You need two things
• Amazon Developer Account -
https://developer.amazon.com
• AWS Account if you’re going to use AWS Lambda -
https://aws.amazon.com
• Hosting for your HTTPS endpoint if you’re not going to use AWS
Lambda
39. Visual Studio Project with Alexa.NET
public async Task<SkillResponse> FunctionHandler(SkillRequest input, ILambdaContext
context) {
switch (input.Request) {
case LaunchRequest r:
return ResponseBuilder.Tell("You've launched your skill");
case IntentRequest r when r.Intent.Name == "MyIntent":
return ResponseBuilder.Tell("You've requested 'MyIntent'");
case IntentRequest r when r.Intent.Name == BuiltInIntent.Cancel:
return ResponseBuilder.Tell("You've requested 'Cancel'");
case IntentRequest r when r.Intent.Name == BuiltInIntent.Stop:
return ResponseBuilder.Tell("You've requested 'Cancel'");
case IntentRequest r when r.Intent.Name == BuiltInIntent.Help:
return ResponseBuilder.Tell("You've requested 'Help'");
default:
return ResponseBuilder.Tell("I don't know what you mean.");
}}
40. Ready to start project available on my repo
github.com/r-hryniewski/Alexa.NET-TalkDemo/tree/template
43. Handling intents
switch (input.Request) {
case LaunchRequest r:
return ResponseBuilder.Tell(“Skill launch request");
case IntentRequest r when r.Intent.Name == "MyIntent":
return ResponseBuilder.Tell(“Intent defined by you”);
case IntentRequest r when r.Intent.Name ==
BuiltInIntent.Cancel:
return ResponseBuilder.Tell(“Built in intent");
}
54. Session
• Yes, we have session.
• Sadly, Alexa.NET doesn’t support seamless integration with
Dynamo DB like JS SDK
55. Session - Demo
private SkillResponse HandleIntent(SkillRequest input)
{
if (input.Session.Attributes != null &&
input.Session.Attributes.TryGetValue("AudienceCount",
out var count))
{
return ResponseBuilder.Tell($"There are around
{count} people here.", input.Session);
}
}
56. And since it’s ordinary .NET Code you can...
• Post messages to Service Bus
• Call HTTP
• Fetch and persist to DB
• Do absolutely anything
59. Business model for single developer
• Every Alexa Skill is available for free (for now)
• You can include paid, premium content in your skills
• Most popular skills in their categories will be awarded by
Amazon
• Developer with at least 1 published skill will receive 100$ for
AWS and additional 100$ per month if it’ll generate any AWS
charges
60. Business model for companies
• Alexa for Business – publishing private skills for companies
https://developer.amazon.com/alexa-skills-kit/alexaforbusiness
61. Connecting with existing solution
• Any REST with HTTPS can be used to expose Alexa Skill
endpoint