Building An Alexa Skill – Who Passed Away?

Motivation often comes when multiple things come together.  I started running three years ago when my (first and second) doctor said I was fat, Zombies was all the craze and Zombies Run, the phone app, was created.  I’ve since made running a part of my life and my life is much better now but I digress.

Sometimes, the end results are not this significant.  Regardless, Amazon recently discounted the  Amazon Echo to $40, I had a week of forced vacations at work and also had to sit house while some tile work.  On a very sour side note, a lot of notable people are passing away.  This past week, George Micheal, Carrie Fisher (and Carrie’s mom, Debbie Reynolds) and Vera Rubin left us.  Having been playing with Alexa for a few days, I wondered: ‘How difficult would it be? – to have Alexa tell me who just died’.

Not hard actually.  I estimate it took me about 8 hours from thought to finish.  My skill currently sits at some certification process on Amazon.  After this, I should be allowed to publish it and the skill will be made available to everyone.  Since I have never done this before, I have no publication expectations.  Just the same, I eagerly anticipate the upcoming steps in this process.  The developer forums say it can take a few weeks and my only regret is that it did not get automatically published so could score some Amazon Swag.  Bummer.  Still, any skill developed can be ‘deployed’ locally to your account for devices you own.  In my house, the skill exists 🙂

Here is a random clip of my skill in use.

And here is an overview of the steps taken to get here.  I am hoping to learn as much from the certification process and keep engaged enough to offer a part two to this post.

Before I start, let me list the different ‘pieces’ to this puzzle.

You can do without many of these; these are just things easily available to most people.  The total expense for this was the price for the Echo at $40.  This is the most affordable way to get an Alexa device in your home.  Priced at $50, it gets often discounted to $40.

Every service used has a free tier suitable for much more than I am using here.

Knowing the purpose of the task (to find out which notable person has recently died), I needed a source of news that would provide such information.  Ideally, an RSS feed that I could consume would give me the most flexibility.  I decided to use Reuters’ People News Feed.

Reuters Feed

This feed provides almost the exact information I want.  It can be defined as critical events to notable people around the world.  With minor parsing, this looks like the perfect data source for my task.

Next up, I found out what format Amazon will accept when reading such a source.  From their Alexa Flash Briefing API Reference, I learned Amazon can ingest data sources in both JSON and RSS formats.  Perfect.  I decided to use RSS just because I am consuming an RSS feed in the first place.

Amazon RSS Multiple Item Format

Next up, I built the simplest Python site to serve my own RSS feed.

Default View.

This view gives me highlights wanted.

Headlines Browser

Now creating a feed Amazon accepts.

Gives me an Amazon-ready RSS feed.  Woohoo!

Headlines RSS Browser

The next step is to create an Alexa Skill at Amazon.  In this case, there is actually not much to such a simple skill as you can see from the following slides.

The first step is to give your skill a display name.

skill1

The next step is to specify actual skill details such as an error message, the actual RSS feed and icons to use in Amazon’s Skills Gallery.

skill2

Testing step! Here I get to enable the Alexa skill for myself.

skill testing

Afterwards, I was able to go to the Alexa App on my phone and activate the skill.

screenshot_20170102-083652

Lastly, I had to provide some meta information about the skill.

skill3

 

Lastly, I submitted the Alexa Skill for certification.  The developer forums has a wealth of information on the certification process.  Expect a followup post, hopefully, all the way to the skill being published.

Thanks for reading!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s