Skip to content

hao-fang/ee596_spr2018_lab1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EE596 Lab 1 -- Build Alexa Skills with the Alexa Skill Kit

Course Webpage: EE596 -- Conversational Artificial Intelligence

Task 1: Build your first Alexa Skill

Task 2: Create an AWS Lambda function from scratch

Requirements:

Steps:

  • This time we will use the Alexa Skills Kit SDK for Node.js
    • We will still use the same Alexa Skill you created for Color Picker.
  • Create another Alexa Lambda function. This time please choose "Author from scratch".
    • Name: ee596_spr2018_lab1
    • Runtime: Nodejs 6.10 (default)
    • Role: you can use the previously created role, or you can create a new role as you did in Step 2.10 in the walkthrough.
    • Click "Create function".
  • Configuration
    • Add triggers under the Designer section: choose "Alexa Skill Kit".
    • Configure triggers: enter your skill ID (check "End Point" page in your Amazon Developer account) and click "Add".
    • Click "Save" at the top-right corner.
  • On your laptop
    • Clone the repository
    $ git clone https://github.com/hao-fang/ee596_spr2018_lab1.git
    
    • Install Alexa SDK for Node.js. You will see a folder node_modules under the lambdaFunc folder.
    $ cd lambdaFunc
    $ npm install --save alexa-sdk
    
    • Edit the lambdaFunc/index.js file, replace the APP_ID in line 8 with your Skill ID. See Step 2.22 in the walkthrough.
    • Zip the lambdaFunc folder
    $ cd lambdaFunc
    $ zip -r ../lambdaFunc.zip *
    
  • Upload the zip file to your Lambda Function.
    • Go back to your Lambda function webpage.
    • Go to the Function code section. (See Step 1.14 in the walkthrough).
    • If you cannot find Function code section, please click the center block ee596_spr2018_lab1 in the section Designer first.
    • Use the drop-down menu Code entry type.
    • Choose Upload a ZIP file.
    • Click Save at the top-right corner.
  • Change your Alexa Skill's Endpoint ARN to this new Lambda Function.
  • Repeat Step 3 in the walkthrough.

Task 3: (Optional) Deploy the AWS Lambda function using command-line

Requirements:

Systems:

  • Linux
  • MacOS
  • Windows 10 WSL (Windows Subsystem for Linux)

Steps

  • Create a virtualenv.
$ virtualenv ee596
$ source ee596/bin/activate
(ee596)
$ pip install awscli
$ aws --version
aws-cli/1.11.53 Python/2.7.6 Linux/3.13.0-105-generic botocore/1.5.16
$ ./sync.sh YOUR_LAMBDA_FUNC_NAME

Lab Checkoff

  • Task 1:
    • Illustrate the sample dialog of Step 3.3 in the walkthrough.
    • In Step 3.4 of in the walkthrough, what is the detected intent when you say how are you?
    • Do you know when you are talking to your bot vs. Alexa?
  • Task 2:
    • Show the configuration of your Alexa Skill Endpoint and the Lambda function ee596_spr2018_lab1.
    • Repeat the sample dialog as you have done in Task 1.
  • Task 3 (Optional):
    • Show the output of your sync.sh command.

Lab Report

  • Please attach the JSON object of your Interaction Model definition. See Step 2.19 in the walkthrough. Describe individual fields in the JSON object.
  • Please attach the JSON input and output in Alexa Simulator in the Developer Console. See Step 3.4 in the walkthrough. Describe individual fields in these JSON objects.
  • Find the functions in the Python codes lambda_function.py in Task 1 that correspond the following handlers in NodeJS codes lambdaFunc/index.js in Task 2.
    • NewSession
    • LaunchRequest
    • SessionEndedRequest
    • MyColorIsIntent
    • WhatsMyColorIntent
    • AMAZON.HelpIntent
    • AMAZON.CancelIntent
    • AMAZON.StopIntent
    • Unhandled
  • Discuss other findings and issues.

References

About

EE596 Lab 1

Resources

License

Stars

1 star

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors