Skip to main content

From the Night Lab… Unbabel Voice

At Unbabel we have something called Night Lab — projects related to the company done by groups of people in their spare time, which get voted on and rewarded at the end of each fiscal quarter.

Phones and sound have fascinated me since I was a kid and I had always wanted to develop systems related to those one day. I thought it would be interesting to marry Unbabel’s core business of plug-and-play translation, speech recognition and a phone-based API in a Night Lab of my own. Thus, Unbabel Voice was born.

Unbabel Voice is an automatic answer system that allows you to translate a language you can speak into any of our supported languages.

You dial a number, tell it what language you would like to translate from, the language you would like to translate to, and the actual content you would like translated.

Then, it transcribes your voice and translates it into the language you’ve requested and says the result back to you.

You can then have it sent to you as an SMS (disabled at the moment), repeated, or just reuse the previously selected language pair for a subsequent translation.

How it’s built

In order not to reinvent the wheel and to make the development cycle much shorter, I opted to call external services for all of the hard functionality. The system uses Twilio Programmable Voice to pick up phone calls, which in turn calls our web service that manages the flow via TwiML.

The interactive menu asks for the source and target languages, which are recognized by Twilio via keywords. After the initial setup is done, a recording is setup and the contents to be translated are sent to our service, which, in turn, asks Google Speech API for a transcription and then sends that to the Unbabel Machine Translation API for translation. We then use Twilio’s Text-To-Speech capabilities to say the result back to the user.

Since this started as a personal project, I took the chance to delve into the development of web applications using the Go programming language, namely using the Gin web framework, and other packages, specifically for integration of the used APIs. I used the BTBurke’s twiml Go library to generate the TwiML for the interactive menus and even contributed a Pull Request upstream. 😜

I asked Sofia Rocha for her superb design skills and she quickly produced a static landing page for this little project, following our internal design guidelines, thanks so much for that! 🎉


This was quite a fun project and I managed to have a prototype working in a weekend or so. It’s definitely interesting to pick up new skills and exercise your coding skills, especially when your main role is in DevOps. 😅

Thank you so much for reading and be sure to finish that side-project you’ve been working on for a while! 😏

The post From the Night Lab… Unbabel Voice appeared first on Unbabel.