How We Fine-Tuned a Kannada TTS Model - Step by Step
Authors: Sreeram Sridhar, Adithya L Bhat, Sasank Chilamkurthy
We wanted to fine-tune a Kannada TTS model using openly available data and open tools. Here's exactly how we did it from Wikipedia dump to a trained model.
Synthetic Data Generation
Code to run this in synthetic_data folder. We document the process here.
Use the Indic NLP sentence tokenizer to break paragraphs into sentences. It handles common full stops, abbreviations like “Dr.”, and other punctuation reasonably well.
After tokenization, we had a list of sentences like: [sentence_1, sentence_2, ...].
4. Random Sampling for Fairness
To avoid bias, we sampled sentences randomly from the list using Python:
import random
sampled_sentences = random.sample(all_sentences, k=1000)
We also created grouped variations:
1 sentence
2 sentences together
3 sentences together
This helps the model learn from input sequences of varying lengths.
5. Generate Audio with Google TTS
We used Google Cloud’s Text-to-Speech API to generate synthetic audio for each sentence.
We used Hugging Face’s datasets and transformers libraries to load the dataset and train the model.
2. Test the Trained Model
After training, we tested the model by giving new Kannada text inputs and generating speech using the trained model. The same GitHub repo provides sample scripts to run inference locally.
Inference code is coming up shortly.
Final Outcome
We now have a fine-tuned Kannada TTS model capable of generating realistic speech for synthetic or real input. This project shows that:
You can start with openly available text.
You don’t need a large team or massive compute resources.
Just a few tools, some scripting, and one decent GPU is enough to get started.
If you want to build your own TTS model in your language, the path is open and doable