Two Tongues

Two languages in one sentence

As a Korean student at an international school in Poland, I encounter three languages every day: Korean, English, and Polish. However, I don’t speak Polish very well, so I communicate and think in Korean and English. But living in two languages introduces some funny problems while speaking, especially when speaking to someone who knows both Korean and English: I get to mix the two languages and speak sort of a “Konglish”. The main reason is that I want to communicate my thoughts as clearly as possible, but the exact words that I want to say are not available in both languages, making me speak both at the same time. That’s why when I recently participated in the Veritas AI Hackathon, I chose to dive into this problem.

Soon, I found out that this was called code-switching and came up with the idea of creating a tool for transcribing in both languages. I found a dataset called HiKE, which seemed to perfectly suit this problem, and chose to fine-tune Whisper on it. The name “Two tongues” was inspired by a poem called “Search for My Tongue” by Sujata Bhatt, which I learned about during literature class. I had two days to make this idea come true.

Recording with my family

Screenshot of Audio Recording Website

For this project, I wanted to put my own touch on it and came up with the idea of creating my own recordings for fine-tuning, which focused mainly on conversations of Korean students living abroad. But using my voice for the training, validation, and test sets would not have been the best option since I wouldn’t have been able to check if the transcription model generalized well enough so that it could detect new voices. Therefore, I asked my family (mom, dad, and my brother) to record some of their own voices by reading the code-switching scripts that I had prepared.

Creating the interface for recording was something that I was struggling to come up with, since manually showing all the scripts and recording them in the iPhone Voice Memos app seemed to be too much work. But I was able to solve this problem by asking ChatGPT to create a website, and in minutes, I was able to come up with a straightforward recording tool dedicated to my project. This was one instance in my life in which I could truly appreciate the convenience brought by AI tools.

Testing on my brother’s voice

For the project, I’ve created two transcription models: one by fine-tuning Whisper-small on the HiKE dataset, and the other by fine-tuning Whisper on both the HiKE and my own recordings (specifically, my + mom’s recording for training, dad’s for validation, and my brother’s for testing). Since all the resources that I had were the T4 GPU from Google Colab, I couldn’t do full fine-tuning, so I used LORA (low-rank adaptation) to freeze most of the weights and only train the adaptors for Whisper-small.

Whisper-small version HiKE test recordings My brother’s recordings
Original 35.42% 25.23%
Fine-tuned on HiKE 30.28% 28.10%
Fine-tuned on HiKE + recordings from my mom and me 30.19% 26.46%

To be honest, the results were a bit disappointing. My hope was that the transcription model that was trained on HiKE + my recordings would easily beat both the baseline and the model only fine-tuned on HiKE since it had been trained with more school-related code-switching examples. Even though that was indeed the case for the HiKE test set, the baseline performed the best for my brother’s recordings (which I kept out for testing)!

Looking back

High Honors Award Certificate

In the end, I received the High Honors Award, with a $1,250 scholarship to join Veritas AI programs. However, what surprised me was the fact that the first-place project had basically the same idea as mine! That team’s project was also transcribing code-switching text, but in Chinese. I saw that they were able to achieve better results by using Whisper-large and fine-tuning it on a massive Chinese dataset. This made me a bit disappointed because it meant that my project, with better execution, would have also had a chance to win the whole Hackathon with thousands of participants from over 75 countries. But it still gave me a bit of encouragement to think that I was able to come up with decent ideas. Next time, with a better GPU, I would like to use a larger Whisper model and see if I can do well as the first-place team.

Clicky Stuff