Building an Alexa Skill in Arabic with Ruby

Fritz Meissner, Sami Birnbaum & Kelly Gebo

When Amazon was planning the Middle East launch of Alexa and the Echo device family, they knew they faced a big challenge. Whilst Alexa might be pretty fluent in English, her existing Arabic skills left a lot to be desired. The team knew they had a lot of work to do to deliver the high-quality experience customers would expect. Delivering a quality localized experience meant developing a local Arabic Khaleeji dialect voice and personality with top-notch quality pronunciation and interpretation skills.

To help tackle this challenge, thoughtbot was brought on board by one of Amazon’s Middle East launch partners to develop a custom Alexa skill for their fast food restaurant chain. As well as opening up a new way of interacting with customers, being an Alexa launch partner offers great PR and marketing opportunities for businesses. This was our client’s first venture into voice-based interfaces, and so to begin with, we focused the Alexa Skill on asking for information, rather than taking action.

“Alexa, check my order”

This unique challenge piqued the interest of the thoughtbot team who are big advocates of thinking critically about what makes sense for our clients and the use case rather than building something how it usually is built. The skill itself was pretty straightforward: customers would ask Alexa to check the status of their most recent food order. This would link to their account with our client, which would then report the status of their order.

So far, so good. But getting accurate Arabic language processing proved to be more difficult. It quickly became clear it would involve extensive testing and input from our client to ensure the language flowed correctly.

So, after engaging with our client and the Amazon team, following thoughtbot’s wider client-centered philosophy, the team decided on a self-hosted Ruby backend for this Alexa skill.

Why Ruby?

Alexa skills are not normally written in Ruby. They are typically written in JavaScript and pushed to Amazon for hosting. This makes them hard to test, which was not the best option for thoughtbot’s client. Given the customer and order data was located in our Ruby on Rails monolith, to minimize costs and time to market, ideally we maintained the existing application vs. created another. The team was tasked with uncovering the best approach and in the process uncovered some benefits to utilizing Ruby..

One of the great things about developing with Ruby is the power and simplicity that testing with RSpec gives you. Ruby specs are easy to write, easy to read, and easy to change, which frees up developer head-space to get on with the core task of making the best product for the client at the lowest possible cost.

And self-hosting the Alexa Skill, meant more privacy control, less cost, and fewer things to maintain.

It also gave the team more control over the integration with our client’s existing food ordering platform.

The result?

An easy-to-maintain, robust, and reliable Alexa Skill that has launched a whole new era of customer voice-based interaction for this market-leading fast food restaurant chain.


If you have a new technology intiative you are considering, we would love to discuss further.