We created an Amazon Alexa Skill in 90 minutes - this is how we did it.

ScientiaTech
Agile Project Management
4 min readNov 4, 2016
Amazon Alexa Skill — Middle East History, by ScientiaTech

On October 20, 2016, Amazon released the new Echo Dot (2nd gen), which is a smaller version of the Amazon Echo. We ordered one, and immediately started playing with it. This is the backstory, and the outcome of our Amazon Skill project.

After looking into the Amazon Skills Kit, we thought that it would be fun to see whether we can create a skill within the 60 minutes that Amazon claims it takes for a developer to get up and started. And sure enough, it took us roughly 90 minutes to build a quiz skill that works as follows:

Alexa will read a total of five questions, and for each question, she will give four choices to answer from. User will guess with the number that corresponds to the answers they believe is the correct one.

To allow a wide range of utterances for the answer, Alexa can follow the utterance list that we created. Other than just saying a number, i.e. “four”, the user may also say “the answer is four”, or “maybe four”, which are acceptable utterances that would correspond to a correct answer. We have about 30 different utterances that allow a wide range of responses that Alexa can understand and process. Below are a few utterance examples:

AnswerIntent {Answer}
AnswerIntent the answer is {Answer}
AnswerIntent my answer is {Answer}
AnswerIntent is it {Answer}
AnswerIntent {Answer} is my answer
AnswerIntent maybe {Answer}

We tested Alexa’s ability to pronounce non-English words

It’s assumed that English words will be accurately pronounced to Alexa’s best ability, but how easy (or hard) is it for her to pronounce non-english words? The idea of the skill was somewhat based on how we could test this ability. So we ended up building a quiz that would involve some questions about Middle East history, focusing our v1.0 mainly on the Persian Empire. We intentionally incorporated locations and names that would be difficult to pronounce by Alexa. She is doing a pretty good job, we must admit, but there is still room for improvement, and Amazon has a few ways to do this.

Their SSML (Speech Synthesis Markup Language) reference guide has a few nifty suggestions on ways to adapt Alexa into speaking the way you want her to. The phonemic/phonetic pronunciation snippet caught our attention:

<speak>
You say, <phoneme alphabet="ipa" ph="pɪˈkɑːn">pecan</phoneme>.
I say, <phoneme alphabet="ipa" ph="ˈpi.kæn">pecan</phoneme>.
</speak>

So, for our v2.0, we will utilize the phonetic pronunciation on words that she is struggling with. But there is one more important point that makes the SSML a critical part of any skill. Alexa has issues understanding the form of a sentence, so words such as “read”, that are written the same both in past and present form, makes Alexa a bit loopy, and she cannot understand whether the word is in past or present form, hence she keeps saying “read” in present form. Unless we want to change it to “red” to make it sound like “read” in past form, there is no easy way to circumvent this issue. Upon contacting Amazon Dev Support on this issue, we received the following response:

I’ve checked the information and would like to inform you that we are receiving lots of customers having the same query and this is a kind of known issue so we need to perform real time troubleshooting to resolve this issue. However, We need to have few more issue related information to isolate the issue completely.

The Alexa team is aware of this issue, and I am sure that we will see improvements as Alexa matures. But for now, the only way to fix these type of mispronunciations is to use the phonetic pronunciation Speech Synthesis markup and change Alexa’s response code to reflect the phonetic spelling:

Can you read? /ri:d/ read
I read a great book. /red/ read

To learn more about this, read Amazons SSML reference guide.

Let’s play the game…

There are two ways to activate the skill:

  1. Check out the skill Middle East History on Amazon and activate it on the website. Make sure to be logged in on the same account that has been associated with your Alexa device
  2. Activate it by saying ”Enable Middle East History skill” and start the game by saying “Alexa, play Middle East History”.

It is also possible, at any time during the game, to say “Alexa, help”, or “Alexa, repeat”.

Try the skill, and let us know what you think!

Say “Alexa, play Middle East History” to play our Amazon Alexa skill.

--

--

ScientiaTech
Agile Project Management

Agile Tech Company in Pasadena, CA. Passionate about Scrum, Lean Startup & Product Development. www.scientiatech.com @ScientiaTechLA