Practice makes perfect and that's no less true when learning Mandarin. Being a tonal language, Mandarin emphasizes the accuracy of pronunciation as multiple words may be spelled the same but their different tones will render a completely different meaning. In that, it is especially important for learners of Mandarin to have practice pronouncing words and rehearsing phrases regularly in order to cultivate a lasting vocabulary and understanding of the language.
However, instructors or speaking partners may not be readily available for all learners. Here, we address this problem by creating an Action for the Google Assistant which provides a small lesson on the basics of Mandarin, available to any device with the Google Assistant.
What it does
Currently, our Action includes a crash course on the four tones:
- An overview of the basics and emphasis on the importance of having correct tones
- Listening and recitation practice with multiple words for each tone
After each word, the user can:
- Choose to practice the word again
- Or move on to the next word in the list
After going through all of the words for a tone, they can either:
- Repeat the entire vocabulary
- Or move on to the next tone At anytime, the user can exit the lesson by saying "end lesson"
How we built it
We built it with using Dialogflow and inline Node.js for custom responses.
Challenges we ran into
Our biggest hurdle involved figuring out whether it would be possible to dynamically switch the Google Assistant between languages in order to pronounce the Mandarin and English with ease. After realizing it was impossible, or at least too troublesome, we decided to have the Google Assistant stay in English and play audio clips of the Mandarin words when necessary.
Accomplishments that we're proud of
Finally getting the audio clips to sound properly was the biggest accomplishment of the project. After that was settled, only the tedium of implementing the dialog was left.
What we learned
Writing up and implementing the dialog for an Action is a very tedious processes so it's especially important to have a well thought out plan before starting.
What's next for Learning Mandarin with Your Google Assistant
In the future we would like to implement a few of the following features:
- Use of visual selection responses (what those icons were made for)
- Saving/bookmarking lesson progress
- Lessons ranging from beginner to intermediate
- Phrase book
- Conversation practice
- And more...
See our presentation here.