How to Create Your Own Duolingo Chatbot for Learning Languages

You’ve no doubt read tens of articles claiming “chatbots have taken over the world” – or something to that effect. It’s clear that chatbots are all the rage these days, and there’s no end in sight to this obsession!

Today, everyone is trying to build their own chatbot for business – or even just for fun. And while there are loads of chatbots on the market that can help you order pizza or find the best deals from eBay, we’re also observing the emergence of conversational chatbots with more academic aims. The chatbots I have in mind help you learn languages.

Duolingo was a pioneer with their language-learning chatbot

Duolingo has been providing language learning services for almost five years now. Over this time, Duolingo has gained an audience of 150,000,000 users and has planted themselves firmly in the top positions in the charts of best free educational apps.

Loyal fans of Duolingo are quite familiar with their motto: “five to twenty minutes of interactive training a day is enough to learn a language.” This ‘interactive training’ focuses on quick tasks centered around vocabulary and grammar goals. And all training takes the form of a game, letting users compete with their friends and family members and get rewards every time they accomplish a goal.

Of course, you can improve your grammar and vocabulary with Duolingo, but what’s the use of this knowledge if you can’t apply it in real life? Practicing your language with a native speaker may be the best way to apply your skills, but unfortunately, not everyone can find native language speakers in the area where they live. Moreover, talking to a real person in a foreign language – if your language skills are rather limited – can feel awkward. Recognizing these challenges, Duolingo’s creators decided to make some improvements to their current language learning program.

A couple of weeks ago, the company introduced a groundbreaking new tool for their iOS app that can make your educational process a bit easier (and perhaps more amusing). Now, you can message with Duolingo’s chatbots that speak French, German, and Spanish – and mimic real-life conversations. These new chatbots let users put their language knowledge to use by discussing various topics whenever they like and without embarrassment. “The less you worry about embarrassment, the better you become at learning languages,” says Luis von Ahn, Duolingo CEO and co-founder.

how_to_develop_a_chatbot_for_learning_languages_Duolingo

To make this new messaging experience even more pleasant, Duolingo gave its bots a bit of personality: Chef Robert, Renée the Driver, and Officer Ada each react in their own unique way to your answers and gently coach you on appropriate responses.

If you happen to run out of your words while chatting in your new language, there’s a “help my reply” button that offers several pre-defined answers to avoid that awkward silence.  

How to build a language-learning bot that communicates via text messages

Even though Duolingo’s bots are currently available in only three languages – and the dialogues may feel slightly far-fetched – the concept of language-learning bots is just excellent. So we decided to brainstorm a bit about how to build a chatbot like Duolingo who can help you practice a language and expand your vocabulary.

Where would you start if you decided to develop a language-learning chatbot? Developing a bot of such complexity from scratch is truly hard work! To be sure, you’ll need some bright minds and a good pile of money to attempt this feat. However, we can suggest a cheaper, but still workable, option.

Luckily for us, there are a number of off-the-shelf solutions that can be used as the base for our future chatbot, including Wit.ai, api.ai, and Playground by Pandorabots. Grab one of these amazing natural language engines and get ready to spend some time teaching your chatbot how to hold an intelligent conversation in a foreign language. However, training your chatbot won’t be that hard considering that you have the power to influence what a user may say next. I’ll explain why.

If you’ve tried out Duolingo’s chatbots, you may have noticed that they’re gently prompting you to give the ‘right’ response. Generally, learners are asked to name an object shown on a card or answer other straightforward questions, which significantly decreases the amount of data that needs to be analyzed. Moreover, the system won’t accept your input if it doesn’t match one of the accepted phrases. how_to_build_a_chatbot_for_learning_languages_Duolingo

It’s easier to develop a chatbot using this approach. As long as users are restricted to several possible correct answers for each of Duolingo’s questions, then the system doesn’t have to analyze piles of heavy data after each user input. Our task, therefore, is to feed our chatbot a set of focused questions along with possible answers.

In Duolingo, these questions are typically based on the material you’ve learned before starting your chat with the chatbot. So in this sense, your conversation with a chatbot resembles a mid-term exam. After all, you will find yourself brushing up on your vocabulary.

What if you want to add voice recognition to your chatbot?

There’s another popular educational application called Mondly which employs a different approach to help their users learn foreign languages.

In August 2016, the Mondly app integrated a voice chatbot that’s designed to build your confidence while speaking a foreign language. It’s powered by speech recognition technology from Nuance, reinforced with Mondly’s own object recognition engine that identifies objects in your speech and gives adaptive audio-visual responses. According to its creators, Mondly’s chatbot understands millions of phrases in 33 languages and can communicate with learners by either voice or text message.

After some hands-on experience with Mondly’s new tool, however, we’re inclined to question this chatbot’s effectiveness. For starters, because there’s no spelling correction, learners may simply not understand what they did wrong. Moreover, it can take forever for the system recognize complicated words you’re trying to pronounce. Get ready for a lot of “I don’t understand what you mean” responses.

how_to_develop_a_voice_chatbot_for_learning_languages_mondly

One nice thing about Mondly, however, is that the application gives its users more space for improvisation than Duolingo. While Mondly may give you a couple of hints as to possible answers, the decision of what to say is always yours.

How do speech recognition engines work, anyways?

Speech recognition solutions are still imperfect. But their limitations don’t make them any less fascinating. Let’s direct our attention to the voice recognition engine provided by Nuance. Nuance’s engine uses different language models – a general dictation model, a web search language model, and a TV language model – to recognize utterances. Their language models consist of millions of words alongside estimates of the likelihood of words occurring in given sequences. And while the models noted above can serve the needs of a wide range of applications (task managers, search engines, personal assistants, and more), there’s sometimes a definite need to modify words and recalculate probabilities for specific contexts. To account for this, Nuance provides its Custom Application Vocabularies feature that lets you create and upload subject-specific vocabularies to the Nuance Cloud Service.

The Custom Application Vocabularies feature is useful if you’re going to develop a language learning chatbot for a select audience, say, for programmers, financiers, medical workers, or sailors. Here’s a clear explanation of how to build such vocabularies (pdf).

However, your choice of speech recognition engines isn’t limited to Nuance’s NDEV SDK. There are several other solutions that can satisfy your needs as well, such as Cloud Speech API by Google, Bing Speech API by Microsoft, or api.ai (which we mentioned earlier).

Where are language learning chatbots heading?

So far, we’ve only seen two apps using AI-powered chatbots to help users practice their language skills. Even though conversations with a computer are nowhere near as good as dialogues with a real human, these chatbots may offer an acceptable – and possibly amusing – way for language learners to practice what they study.

Thanks to its strong spelling correction and “gentle pressure,” the Duolingo bot may be an effective tool for people who have just started studying a new language, whereas the Mondly chatbot will be a delightful companion for intermediate students who already have a rich vocabulary under their belt and want to hone their pronunciation.

Chatbot creators promise to improve their services in the near future. Currently, Duolingo is at a stage where they can build a new conversation every two days. However, the company’s goal isn’t just to have loads of potential dialogues in their main app, but rather to have one chatbot that will embody the whole app. Von Ahn says he wants Duolingo’s bot to be as professional as a human tutor by 2020. But who knows – maybe your chatbot will achieve this goal even sooner!

4.3/ 5.0
Article rating
64
Reviews
Remember those Facebook reactions? Well, we aren't Facebook but we love reactions too. They can give us valuable insights on how to improve what we're doing. Would you tell us how you feel about this article?

We use cookies to personalize our service and to improve your experience on the website and its subdomains. We also use this information for analytics.

More info