Skip to content

arun-gupta/alexa-skill-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello World using an Alexa Skill and Java

Pre-setup Alexa Skill

  1. Create an account at http://developer.amazon.com and login

  2. Select Alexa, Alexa Skills Kit, Get Started >, Add a New Skill

  3. Use Name and Invocation Name as Hello World

  4. Click on Save

  5. Copy the Application Id (from top left) and paste it in the HelloWorldSpeechletRequestStreamHandler class

Create Lambda function

  1. Create bucket: aws s3 mb s3://alexa-java-skill --region us-east-1.

  2. Create and upload a deployment package: mvn -f hello-alexa-world/pom.xml package install

Setup Alexa Skill

  1. On http://developer.amazon.com, click on Next

    1. Copy content of IntentSchema.json in Intent Schema

    2. Copy content of SampleUtterances.txt in Sample Utterances

    3. Click on Next

    4. Select AWS Lambda ARN

    5. Get Function ARN: aws lambda get-function --function-name HelloAlexaWorld --region us-east-1 | jq .Configuration.FunctionArn and paste it in the textbox labeled Default

  2. Click on Next

Test Alexa Skill

The different intents can be tested in Service Simulator or https://echosim.io.

Hello

Type say hello in Enter Utterance and click on Ask Hello World. The output should look as shown.

intent1

Hello World N times

Type say hello 3 times:

intent2

Name of a person

Type what is the name of 1:

intent3

Skill can also be tested at https://echosim.io/ or using Alexa Echo.

  1. Ask Hello World say hello

  2. Ask Hello World say hello 3 times

  3. Ask Hello World what is the name of 1, 2 or 3

References