Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Alexa for Developers

9 views

Published on

Voice is the most natural way for humans to communicate and will be the ubiquitous way to communicate with computer systems in the 21st century. Learn how you can voice enable your products or services by developing Voice-based Applications (aka Skills) for Amazon Alexa. After a quick state of the union, this talk will teach you to create a voice based user experience and to deploy it to Amazon Alexa. We will explain the main concepts of a voice application and we will show you how to create a Skill from scratch.
Level : 200 - coding experience required.

Published in: Devices & Hardware
  • Be the first to comment

  • Be the first to like this

Alexa for Developers

  1. 1. Creéz votre première Skill Alexa sur AWS Sébastien Stormacq Manager, Alexa Solution Architecture, EU @ sebsto
  2. 2. 1 9 7 0 s 1 9 8 0 s 1 9 9 0 s P R E S E N T2 0 0 0 s This Magic Moment Character Mode GUI Web Mobile VUI
  3. 3. Voice represents the next major disruption in computing W E B E L I E V E :
  4. 4. Comprised of two important frameworks that enable brands to connect to customers Lives In The Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Learning Alexa’s Framework
  5. 5. Comprised of two important frameworks that enable brands to connect to customers Lives In The Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Learning ALEX A V O ICE SERV ICE Unparalleled Distribution: AVS allows your content to be everywhere Alexa’s Framework
  6. 6. A L E X A - E N A B L E D D E V I C E S
  7. 7. Comprised of two important frameworks that enable brands to connect to customers ALEX A V O ICE SERV ICE Unparalleled Distribution: AVS allows your content to be everywhere Lives In The Cloud Automated Speech Recognition (ASR) Natural Language Understanding (NLU) Always Learning ALEX A SKILLS KIT Create Great Content: ASK is how you connect to your consumer Alexa’s Framework
  8. 8. Alexa Skills Store (Desktop & Mobile) Alexa App (Desktop & Mobile) Or just ask Alexa! Where and How to find Skills ?
  9. 9. Custom For crafting unique app experiences Smart Home For controlling smart home and devices Flash Briefing For providing flash briefing content (either audio, video or text) “Alexa, allume la cuisine” “Alexa, quel est mon flash quotidien ?” “Alexa, demande à Marmiton une recette de crêpes.”
  10. 10. Voice User Interface Programming Logic + developer.amazon.com aws.amazon.com (could be hosted anywhere) Back-EndFront-End
  11. 11. Alexa Skills Kit Request Audio Response Your Service Text to Speech Machine Learning Natural Language Understanding Speech Recognition Cards
  12. 12. Wake word detection Beam forming Cards Your Service Request Alexa Skills Kit: Signal Processing Text to Speech Machine Learning Natural Language Understanding Speech Recognition Response
  13. 13. Alexa wake word S p e a k w i t h A l e x a
  14. 14. Alexa Skills Kit: Utterances Into Intents Your Service Cards Utterances Intents Text to Speech Machine Learning Natural Language Understanding Speech Recognition Response
  15. 15. Alexa, ouvre mon restaurant wake word Invocation namelaunch S p e a k w i t h A l e x a démarre commence lance allume mets
  16. 16. Alexa, demande à mon restaurant une suggestion pour le déjeuner wake word Invocation namelaunch S p e a k w i t h A l e x a utterance une recommendation pour le midi un bon endroit pour manger la meilleure place pour déjeuner
  17. 17. Alexa, ouvre mon restaurant wake word invocation namelaunch S p e a k w i t h A l e x a Recommande-moi un restaurant avec quatre kilometres de marche slot utterance RecommendationIntent {distance: “4”} slot value intent
  18. 18. Alexa Skills Kit: Requests and Responses Your Service Cards Audio Intents Text to Speech Machine Learning Natural Language Understanding Speech Recognition Response
  19. 19. Text to Speech (SSML) Machine Learning Natural Language Understanding Speech Recognition Alexa Skills Kit: Output Your Service Cards Audio Intents Response
  20. 20. Upload your code Setup your triggers Runs only when triggered Pay only for the compute time used! Deploy your Back-End AWS Lambda
  21. 21. Language (Interaction) Model Skill Code (Lambda Function) Skill Publish Information Alexa Developer Portal Alexa Developer PortalAWS Console Local Code+ Skill Development
  22. 22. Local Code Language (Interaction) Model Skill Code (Lambda Function) Skill Publish Information Skill Development alexa.design/askcli
  23. 23. ASK Command Line Interface Based on Node JS • Runs on Windows, Mac, Linux Manage Skills Programmatically • uses Skills Management API (SMAPI) Deploy Skill Lambda Functions • uses AWS CLI under the hood alexa.design/askcli ASK CLI != AWS CLI
  24. 24. Skill Manifest CLI mapping to profile information Front-End Back-End
  25. 25. alexa.design/nodesdk alexa.design/javaalexa.design/python
  26. 26. LET’S BUILD A SKILL
  27. 27. Persistence
  28. 28. • Remember: AWS Lambda maintains no state across executions • As a Skill Builder, you therefore have two layers of memory: Session Attributes Persistent Attributes Expire when session ends Persist across sessions Memory
  29. 29. Sessions Attributes const attributesManager = handlerInput.attributesManager; const sessionAttributes = attributesManager.getSessionAttributes(); /* YOUR CODE LOGIC HERE */ sessionAttributes["profile"] = ...; attributesManager.setSessionAttributes(sessionAttributes);
  30. 30. Connect to Amazon DynamoDB const skillBuilder = Alexa.SkillBuilders.standard(); exports.handler = skillBuilder .addRequestHandlers( // ... handlers ) .addRequestInterceptors( // ... request interceptors ) .addResponseInterceptors( // ... response interceptors ) .addErrorHandlers(ErrorHandler) .withTableName("theFoodie") .withAutoCreateTable(true) .lambda(); Table
  31. 31. Fully managed Low cost Predictable performance Massively scalable Highly available
  32. 32. Persistent Attributes const attributesManager = handlerInput.attributesManager; let persistentAttributes = await attributesManager.getPersistentAttributes(); persistentAttributes.profile.allergies = "shellfish"; attributesManager.setPersistentAttributes(persistentAttributes); attributesManager.savePersistentAttributes();
  33. 33. AWS-SDK to call services
  34. 34. Ressources alexa.design/france Alexa Skills Kit in France alexa.design/github alexa.design/guide Alexa Voice Design Guide Github Alexa alexa.design/videotutorial Video Series : Building Alexa Skills from Scratch alexa.design/nodesdk Main repo for the ASK NodeJS SDK alexa.design/askcli Alexa Command Line Interface
  35. 35. Merci ! @ sebsto

×