Alexa Skills

Is "No UI"

the

"New UI"?

voice is everywhere

We kind of all agreed it was the future

So what are we so afraid of?

It's all still web technologies

😱😱😱😱😱😱😱😱

Then DON'T use

  • Google
  • Facebook
  • Windows
  • iPhones
  • Banking
  • XBOX
  • Emails
  • TVs
  • Credit Cards
  • Target
  • Youtube
  • Cars
  • Instagram
  • Meetup.com
  • The Outdoors...

But should I use Alexa??

Is it safe?

I use Alexa

Alexa turns on my lights

Tells me what is for lunch at work

Orders things for me

Answers random questions

Isn't Alexa evil??

Alexa connects to Amazon Web Services and sends data to existing services that are connected. Just like the browser does.

The ad tracking is real

like everywhere else on the web

Alexa is always listening

OK, but what does she do??

Alexa is listening for specific "wake" words before doing anything

  • "Alexa"

  • "Echo"

  • "Amazon"

  • "Computer"

Or if you talk about Alexa Bliss 

Probably anyone with"Alexa" in their name

She isn't always right...

"Black Sabbath"

She also wakes to

it's the "ack sa" portion

She does save

everything she hears

"Alexa, delete everything I said today"

if only she had the power to do that some days...

she knows which device you are speaking to

Look at the traffic

So let us listen to the network

Well, almost all the traffic is encrypted...

That is a GOOD thing!!!

Some traffic just pings a Amazon page

So we don't always know what Alexa sends,

how about when she sends data?

Recreate a test from iot-tests.org

1. ~8 seconds of a silent room

2. Asking Alexa “What time is it?” and awaiting the answer (~6 seconds)

3. ~8 seconds of a silent room

4. “Alexa – tea, earl grey, hot” and await the answer (~5 seconds)

5. ~23 seconds of a normal conversation between two people (not including any Alexa keywords)

Traffic spikes on wake word

Or Black Sabbath

IS Alexa Spying???

Probably not, but I can't say 100%

Check your level of paranoia before purchasing

She got Skills

These are what Alexa calls the tasks she can perform.

Skills Require

  • Microphone

  • Speaker

  • Alexa service

  • Lambda service

doesn't have to be the same device

Connect whatever hardware you like!!

What are the steps in the process??

Alexa listens for the wake word

Alexa sends the audio to the aws alexa service

The service turns the audio into text and compares with your alexa skill options for next step

Send data on or respond with a question for more data

Send data to lambda

From here interaction with the rest of the internet is an option

  • Return a predefined response
  • Return response based on a REST API
  • Return response based a database

alexa responds with audio

Blah Blah Blah

My Conclusions

  • I don't think this is the end of audio interface
  • Companies do care about security
  • About as safe as your phone is
  • The skills only make small wins here and there
  • I find people creepier than machines

Make Alexa Skills

 

  • An aws account

  • A computer on the internet

You will need

Alexa Skills Vocabulary

Invocation - Alexa will "ask" your invocation phrase for an intent

Intents - Describe actions from what someone says to alexa

This is how we lay out the audio user experience after the blue ring wake up

The Invocation and an Intention to build an expected request

"Alexa, ask web devs when is the next meet up?"

Now we decided the experience we need to build the pieces of the skill

Build it all

Let's use "web devs" for invocation

Create a custom intent "NewxtMeetup" and utterances

"Alexa, ask web devs when is the next meet up?"

is now set as the experience

Set up lambda

Add a trigger to your lambda and your Alexa Skill ID

Code lambda

We will use node.js to:

Make a REST API call to meetup API (I used axios)

Handle for a few alexa scenarios

Return json to alexa after triggered

{
"application": {
      "applicationId": "amzn1.ask.skill.dfcdacc6-394c-49c0-b091",
"request": {
    "type": "IntentRequest",
    "requestId": "amzn1.echo-api.request.0f952a34-8b61-4b06-8ae5-de370832e2d8",
    "timestamp": "2019-07-07T05:52:18Z",
    "locale": "en-US",
    "intent": {
      "name": "NextMeetup",
      "confirmationStatus": "NONE"
    }
}

Alexa posts json to lambda via the trigger

there is more data than this in the json

{
  		"version": "1.0",
  		"response": {
  			"outputSpeech": {
  				"type": "PlainText",
  				"text":"next eugene web devs is now"
  			},
  			"reprompt": {
  				"outputSpeech": {
  					"type": "PlainText",
  					"text": ""
  				}
  			},
  			"shouldEndSession": true,
  			"type": "_DEFAULT_RESPONSE"
  		}
  	}

json we want to send back

I set up a few functions

 

getNextMeetup()

use axios to hit meetup API and get next meetup

onLaunch()

Return response if no intent is passed from alexa

onIntent(intentRequest, nextMeetUp)

when an intent is passed decide what response to Return

code on github 

try {
    
        if (event.session.application.applicationId !== skillId) {
             
             context.fail("Invalid Application ID");
         }
         
        if (event.request.type === "LaunchRequest") {
            return onLaunch();
          }
        else if (event.request.type === "IntentRequest") {
              return onIntent(event.request, nextMeetUp);
          }  
     } 
    catch (e) {
            context.fail("Exception: " + e);
        }

Check the ID, decide what the request type is, and pass to the right function

Test in alexa dev console

 

type in

or

speak 

Distribute

We now have a simple Alexa Skill

Alexa Skills

By Antonio Ortega