Alexa in 10 Minutes
James Burt
Brighton Java
28th June 2017
What is Alexa
Alexa is:
A virtual personal assistant
What is Alexa
Alexa is:
A virtual personal assistant
An Amazon product
What is Alexa
Alexa is:
A virtual personal assistant
An Amazon product
Not perfect
Not Perfect
Why is this interesting?
Alexa is:
Why is this interesting?
Alexa is:
Open to new skills
Why is this interesting?
Alexa is:
Open to new skills
A hands-free interface
Why is this interesting?
Alexa is:
Open to new skills
A hands-free interface
A simple way to play with VUIs
How Alexa Works
How Alexa Works
Intent: Will it rain?
 Will it rain?
 Is it going to rain?
 Is it going to rain today?
 Is it likely to rain?
 What’s the chance of rain today?
 Do I need my umbrella today?
The application
The Code
Two main classes:
● Connector between Alexa and AWS Lambda
● A speechlet
SpeechletRequestStreamHandler
package com.riddlefox.tarot;
import java.util.HashSet;
import java.util.Set;
import com.amazon.speech.speechlet.lambda.SpeechletRequestStreamHandler;
public class TarotSpeechletRequestStreamHandler extends SpeechletRequestStreamHandler {
private static final Set<String> supportedApplicationIds = new HashSet<String>();
static {
String appId = System.getenv("APP_ID");
supportedApplicationIds.add(appId);
}
public TarotSpeechletRequestStreamHandler() {
super(new TarotSpeechlet(), supportedApplicationIds);
}
}
Speechlet Interface
SpeechletResponse onLaunch(SpeechletRequestEnvelope<LaunchRequest>
requestEnvelope);
void onSessionStarted(SpeechletRequestEnvelope<SessionStartedRequest>
requestEnvelope);
void onSessionEnded(SpeechletRequestEnvelope<SessionEndedRequest>
requestEnvelope);
SpeechletResponse onIntent(SpeechletRequestEnvelope<IntentRequest>
requestEnvelope);
Speechlet
Deployment of the Code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Deployment of the code
Does it work?
What next?
What next?
What next?
Any questions?
@orbific
james@orbific.com
Development blog: jamesburt.me.uk

Alexa in 10 minutes