I recently purchased an Amazon Echo and ever since I’ve been enthralled by Alexa – the voice service that powers the device.
I’m not entirely sure why, but I’ve never used Siri all that much. Maybe it’s because I’m often in public places, around people I know or don’t, when I need to use it and it just feels odd to hold my phone up and ask it questions. It’s probably a generational thing, but I just don’t use Siri.
The Echo is entirely different. My Echo is in my home, waiting for me on my mantel. Only my family and friends are around me. And… I don’t have to hold it. I just say, from almost any room, “Alexa…” and then whatever I want and she responds with incredible accuracy.
I say Alexa, play some music and she starts up a playlist from Amazon Prime.
Alexa, what’s my commute look like? She tells me the fastest route to work.
Alexa, tell me the news. She streams NPR, BBC or whatever list of news stations I like.
Alexa, what’s the weather this weekend? Alexa, tell me a joke. Alexa, do you know Sky Net? And on, and on, and on. I think my current favorite is: Alexa, Tea, Earl Grey, Hot.
But this is a developer’s blog and this post is about more than just new tech.
Alexa Skills Kit
Yes. That’s right. You can develop for the Echo and that’s why I’m really fascinated by Alexa.
A Trivia Game
I decided I’d start learning Alexa development by following one of the Amazon developer tutorials and creating a trivia game. Given I work at WashU, I thought a WashU Trivia Game would be easy.
As it turned out, it was easy to create the skill and configure my Echo to be a developer device. The only hard part was to come up with 40-odd questions that weren’t too difficult. I mean, you want people to get a few questions right – it has to be fun after all.
Within a day, I was playing my very own trivia game on my Echo.
How cool is that?
Publishing The Skill
Next, I wanted to learn how to publish my trivia game on the Amazon servers so others could install the game on their own devices.
Step-wise, the process is straight-forward and relatively simple.
Step 1: Name the skill.
The invocation name is the phrase you use to start the skill. I chose “washu trivia game” so I could simply say Alexa, play WashU Trivia Game to start up a new game.
Step 2: Define an interaction model.
This step is fascinating. I’ve worked with user interfaces my whole career, but they have always been primarily visual. A voice interface is a whole new world.
Thinking through the various ways someone might vocally interact with your skill brings a whole new perspective to thinking about your audience first.
Step 3: Configure and test.
Testing has never been quite so fun. Not only can you test the logic of your skill, but you test your language and grammar and you can teach Alexa how to say words it doesn’t know.
Step 4: Submit.
Finally, I had to submit my skill to be published to the Amazon Store, so I clicked the “Submit for Certification” button and waited for the powers-that-be to review and approve my trivia game for the world to enjoy.
My skill failed certification. In fact, it has failed three times and I’ve given up on this particular project.
You see, my trivia game failed not because of my code. No, it failed repeatedly because of it’s name.
On my first attempt, the name of my skill was “WashU Trivia Game” and the invocation name was “washu trivia game.”
It failed because the reliability of Alexa understanding the word “washu” was too low. This was not terribly surprising given my testing, so no big deal.
This time I changed the invocation name to “washington university trivia.”
You’re only allowed three words in an invocation name, so I couldn’t go with “washington university in st. louis trivia game,” but that wasn’t the problem. I was flagged for violating the IP for the university.
Now, I work at WashU. I could probably get approval from the university, but this trivia game isn’t my end game – I’m just creating this skill to learn and I just don’t want to go through the time and effort to get the rights to publish this for the university.
In the feedback I received on my second attempt, I was told I could try “trivia for …” so that it didn’t look I was creating the university’s official trivia game. So, on my last try, I changed the invocation name to “trivia for washu” – remember, I can’t use more than three words, so I can’t submit “trivia game for washington university” as the invocation name.
Unsurprisingly, this attempt failed because of the low probability Alexa would understand “washu.”
Realizing quickly my i variable wasn’t incrementing, I decided to break out of this for loop.
I really was hoping this post would be about the skill I created for the Amazon Echo. Unfortunately, it seems that just wasn’t meant to be.
So, what’s next and why am I writing about Alexa when this is a blog about me learning WordPress development? Well, I have a new project that is a WordPress project and an Alexa project.
I’m going to write a web service that queries realtime data from a 3rd party data source and then I’m going to write a WordPress plugin to query that service and display the data in this WordPress site, and then I’m going to write an Alexa skill to query that same service to tell me the data when asked.
If I make it through this project, I will be creating a standard UI to interact with data via a website and a VI (voice interface) to interact with those same data through my Amazon Echo.
Is it just me or is that not crazy cool?
Follow me on Twitter: @amelungc