Advertisement
Javi

Alexa

Mar 2nd, 2017
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. # Voice assistants
  2.  
  3. ## Alexa registration
  4.  
  5. * [alexa.amazon.com]
  6. * [echosim.io] and select EN-GB
  7. * [https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/getting-started-guide](Documentation)
  8.  
  9. ## Glosary
  10.  
  11. * Custom skill
  12. * Intent (actions schema)
  13. * Slots
  14. * Utterances
  15. * Function or web service
  16. * Configuration
  17. * Card
  18.  
  19. ## Permission configuration
  20.  
  21. * Download and install [AWS Cli](http://docs.aws.amazon.com/cli/latest/userguide/installing.html)
  22. * Create a IAM user for serverless and download AK/SC
  23. * AWSLambdaFullAccess
  24. * IAMFullAccess
  25. * AmazonS3FullAccess
  26. * AmazonAPIGatewayAdministrator
  27. * CloudformationFullAccess
  28. * Set up credentials: ```aws configure```
  29.  
  30. ## Skill development
  31.  
  32. * Download and install [Serverless](https://serverless.com/framework/docs/providers/aws/guide/installation/)
  33. * Install NodeJs
  34. * Run `npm install -g serverless`
  35. * Check it with `sls --version`
  36.  
  37. * Create a new project with `serverless create --template aws-nodejs --path motivator`
  38. * Configure the serverless.yml file
  39. ```
  40. service: motivator
  41.  
  42. provider:
  43. name: aws
  44. runtime: nodejs4.3
  45. region: eu-west-1
  46.  
  47. functions:
  48. motivator:
  49. handler: handler.motivator
  50. events:
  51. - alexaSkill
  52. ```
  53. * Deploy with ```sls deploy```
  54.  
  55. ## Configure skill
  56.  
  57. * [Skills Kit](https://developer.amazon.com/edw/home.html#/skills/list)
  58. * Press *Add a New Skill*
  59. * Skill information
  60. * English UK as language
  61. * Motivator as name
  62. * "Alexa, ask motivator" as invocation
  63. * Interaction model
  64. * Be sure to us UK English
  65. * Set intent
  66. ``` json
  67. {
  68. "intents": [
  69. {
  70. "intent": "motivator",
  71. "slots": [
  72. {
  73. "name": "target",
  74. "type": "CIBERADO_NAMES"
  75. }
  76. ]
  77. }
  78. ]
  79. }
  80. ```
  81. * Press *Add Slot Type*
  82. * Set "CIBERADO_NAMES" as slot name and "Emma, Pau, Jesus, Javi, Me, Myself" as values (one on each line)
  83. * Add next utterances:
  84. ``` json
  85. motivator energize myself
  86. motivator energize me
  87. motivator give me energy
  88. motivator motivate me
  89. motivator motivate {target}
  90. ```
  91.  
  92. * Endpoint
  93. * Set Lambda to what ```sls info --verbose``` reflects (without version number)
  94. * Complete the rest of the configuration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement