How to Build Your First Amazon Alexa Skill, Pt. 2: Skill Interface

Welcome back, Alexa geeks! In the last article, we laid the groundwork for making our first Amazon Alexa skill. We covered the concepts and frameworks in Alexa skill development. We also did some work in AWS Lambda to prepare for voice requests  being made to our service.

 

Quick Recap on The Alexa Skill Service / AWS

We’ve slept a few times since covering the concepts and AWS framework, so let’s quickly recap.

2017-03-01-002-Alexa-Skill-Process-Framework

Whenever we use an Alexa skill , our voice data is processed through the hardware device, through the skill interface (what we’re looking at today) for language processing, then converted into text for a program to execute against, and back again. Simple enough, right?

In the last article, we looked at the “last” leg of this process, the skill service and AWS Lambda. Now, we’ll be working with that and the skill interface portion.

2017-03-07-001-Alexa-Skill-Interface-Develpoment-Framework

 

Setting Up the Basic Skill Information

Alright, log into the Amazon Developer Portal and Select the Alexa menu option. Once there, you should have a choice between the Alexa Skills Kit or the Alexa Voice Service. Click on the Alexa Skills Kit link to continue. You’ll want to click, “Add a New Skill”. Because I’ve already developed a skill, Silly Marketing Strategies is already there. However,  most of y’all will probably not have anything else on screen.

2017-03-07-002-Alexa-Skill-Interface-Develpoment-Framework

To start, you’ll want to select Custom Interaction Model, leave the default language to US (unless you’re developing in Espanol?). Type out the name and invocation name for your skill. The name isn’t necessarily important this moment. However, the invocation name will be extremely important!! This will be how users will call your Skill into service.

Note: the astute will notice I’ve deviated from the Space Geek example of the last article. More on that later. 🙂

When you’re ready, click next to proceed, and we’ll tackle the interaction model.

2017-03-07-003-Alexa-Skill-Interface-Develpoment-Framework

 

Setting up the Skill’s Interaction Model

Alright, time for some important things here. For the purposes of the factoid-based game, we’ll only be looking at the Intent Schema and Sample Utterances fields.

First, we need to look at the Intent Schema. Remember the files you downloaded in the first article? You’ll need to go into the SpaceGeek folder, Speech Assets sub folder and open the IntentSchema.json file. I’ve opened it up in Sublime Text 2 briefly, so we can take a quick look at the file. So this is JSON, with intent pairs. Below, we’ve got a pretty simple set, intents for retrieving a fact from the skill, getting help, stopping and cancelling a function. It’s easy right? Ha.

2017-03-07-004-Alexa-Skill-Interface-Develpoment-Intent-Schemas

Quick note: because these intents are proceeded by Amazon – it means they’re built in for Amazon. Enough babbling, copy and paste the contents of this file into the Intent Schema section of Amazon Developer Console.

2017-03-15-005-Alexa-Skill-Interface-Develpoment-Intent-Schemas-Utterances

Above, we’ve pasted in the Intent Schema. Next, we need to provide some sample utterances. Sample utterances are what you think users might say to engage your Alexa Skill. Below, we’ve provided such examples as, “Tell me a Weimaraner fact”.

Next, we need to hook up the Alexa Skill interface we’ve put together with some computing power. Specifically, we need to hook it up to AWS Lambda! (Remember the first article where we did a bunch of Lambda setup?)

If you recall, there was an Amazon Resource Name (ARN) string that we copied and saved to a text file. Retrieve it now and paste into the “Configuration” screen of the Skill interface setup.

2017-03-15-006-Alexa-Skill-Interface-Develpoment-Intent-Schemas-Utterances

Providing the ARN you’ve provided is valid, you should be able to proceed to the next step. Note: we are ignoring the account linking functionality for now. This functionality allows you, for example, to integrate Twitter sharing functionality into your skill by sharing a Tweet.

Next, we’ll move on to the Test tab. Three things (below) to take note of:

  1. Ensure you’ve completed the Interaction Model tab, so you can complete the testing in this tab.
  2. Try / type out key phrases in your skill to hear how they’ll be pronounced, via the Voice Simulator.
  3. Enter some utterances into the Service Simulator to A) make sure your skill is functioning as intended and B) Get a feel for how the end user experience will happen

2017-03-18-006-Alexa-Skill-Interface-Develpoment-Testing-Tab

Once you’ve tested your Skill, proceed to Publishing Information. Here, you’ll need to include the following:

  • Category of your Alexa SKill
  • The relevant Sub Category
  • Optional: testing instructions if your skill requires credentials or other unusual needs. You probably don’t need to include anything for this example
  • Country & Region targeting
  • Short Skill Description
  • Full Skill Description
  • Example Phrases, drawn from your sample utterances, and preceded by the Alexa wake word and skill invocation name
  • Optional: keywords that will help Alexa users find your skill in search
  • Images in 108 and 512 pixel squared dimensions

Below are a couple of screenshots for how I’ve filled out these fields.

2017-03-18-007-Alexa-Skill-Interface-Develpoment-Publishing-Information

2017-03-18-008-Alexa-Skill-Interface-Develpoment-Publishing-Information

Alright, we’re so close! The last field is Privacy & Compliance. For this example, you should be checking “No” to all the radio buttons:

  • No, skill doesn’t allow users to make purchases or spend real money
  • No, skill does not collect personal information from users
  • No, skill does not target children under the age of 13

However, do note that some of these things (except for child targeting) may change as we progress in our Alexa Skill development capabilities.

If desired (or later required by more advanced capabilities) you may specify privacy policy and terms of use URLs.

If you’ve completed the above, you should be good to Save & Submit for Certification!

 

Wrap Up

This is a deceivingly involved process. You will note that neither in the previous article, nor this article, have we changed the original source code for the SpaceGeek / Weimaraner Facts Skill. We’ll cover this in more detail in the next article. Until next time, check out my journey in learning NoSQL and keep an eye out for more content soon!

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *