Fine tuning Lithuanian Speech Recognition
The Problem
Whisper is the obvious choice if you want to transcribe English audio. But as someone married to a Lithuanian, it’s far less clear what works for a language with 3 million speakers. Whisper large-v3 produces transcripts with mangled diacritics, confused case endings, and occasionally hallucinates entire passages. NVIDIA’s Parakeet does better out of the box but still isn’t great. For interviews and trancscribing old vidoes — bad transcriptions are a huge pain.
So I decided to dig deep on how good we could get Lithuanian ASR with a few days of work and minimal budget.
The Approach: Benchmark First, Then Improve
Rather than guessing which model might work best, I built SpeechBench, an automated benchmarking platform that evaluates ASR models head-to-head across multiple languages and datasets. The goal was to make model selection data-driven rather than anecdotal.
What SpeechBench Measures
SpeechBench tests 26 ASR models across 8 datasets, running on GCP spot GPUs. For each model-dataset pair, it measures:
- Word Error Rate (WER) — the percentage of words the model gets wrong
- Character Error Rate (CER) — finer-grained accuracy, critical for morphologically rich languages like Lithuanian
- RTFx — real-time factor (how many seconds of audio processed per second of wall time)
- Peak GPU memory — practical for deployment decisions
- Per-clip latency — important for interactive applications
The models tested include the Whisper family (tiny through large-v3-turbo), NVIDIA’s Parakeet models (TDT, RNN-T, CTC variants from 110M to 1.1B parameters) and Google’s Gemma 4 multimodal models.
What the Benchmarks Revealed
The results on Lithuanian (Common Voice 25, starting with n=30 clips, later expanded to n=300 for statistical rigor) were illuminating:
| Model | Lithuanian WER | Notes |
|---|---|---|
| Whisper large-v3 | 36.67% | The expected best general-purpose model |
| NVIDIA Parakeet TDT 0.6B v3 | 29.58% | Already better out of the box |
| Gemma 4 E4B-it | 60.42% | Multimodal, not competitive for ASR |
| Whisper large-v3 (on AMI IHM) | 308% WER | Catastrophic hallucination |
Two surprises: NVIDIA’s Parakeet already beat Whisper on Lithuanian without any fine-tuning, and Whisper large-v3 occasionally hallucinates entire passages on certain datasets (308% WER means the transcript is 3x longer than the actual speech — the model invented text wholesale).
The entire benchmark sweep — 21 models across 5 datasets, 105 jobs — cost ~$2.22 and took about 3.8 hours of wall time using GCP spot instances. Results are published on a Firebase-hosted dashboard.
Fine-Tuning: From 29% to 10% WER
With Parakeet identified as the strongest baseline, I built FineTuneParakeet to push on Lithuanian accuracy. The fine-tuning used three open datasets:
- Common Voice 25 — crowd-sourced read speech (~19K Lithuanian clips)
- VoxPopuli — European Parliament proceedings
- FLEURS — Facebook’s multilingual evaluation set
The Critical Discovery: Frozen BatchNorm
The single most important technical finding was that freezing BatchNorm layers to eval mode prevents catastrophic forgetting. Without this, fine-tuning destroys the model: WER degrades from 14% to 36% within hundreds of training steps, regardless of learning rate. With BatchNorm frozen, the model improves steadily.
Other hard-won lessons:
- fp32 only — mixed precision training breaks the Transducer-Duration-Transducer architecture
- Don’t normalize training text — the tokenizer expects mixed-case input; lowercasing corrupts the vocabulary
- Token-level language models — word-level LMs don’t work with BPE tokenizers; you need the
chr(id + 100)encoding trick to map token IDs to characters that KenLM can process
Results
| Dataset | Baseline WER | Fine-tuned WER | Improvement |
|---|---|---|---|
| Common Voice 25 (Lithuanian) | 16.53% | 10.76% | 34.9% relative reduction |
| FLEURS (Lithuanian) | 21.41% | 17.54% | 18.1% relative reduction |
The best configuration: epoch 4 checkpoint, beam search (beam width=4), plus a token-level 5-gram language model (alpha=0.5). The language model alone contributed a 2.83 percentage point WER reduction.
Training cost: ~2.5 hours on an RTX 3090, or about $3-5 for a full GCP run. The fine-tuned model is published on HuggingFace as sliderforthewin/parakeet-tdt-lt.
Error Analysis
At 10.76% WER, 87% of remaining errors are substitutions (not insertions or deletions). The dominant error pattern is Lithuanian diacritical confusion — the model confuses characters like ą vs a and ė vs e. These are the ogonek and dot-above marks that distinguish different Lithuanian vowels, and they’re acoustically very subtle.
Supporting Tools: Language Models for Any Language
The fine-tuning work produced a reusable tool -
asr-lm-builder builds token-level n-gram language models for any language. Give it a language code and it automatically downloads text corpora (Wikipedia, OpenSubtitles, Europarl, CC-100), tokenizes with any model’s BPE tokenizer, and builds KenLM ARPA files. For Lithuanian, it pulled from three sources and built the 5-gram model that contributed a 2.83 percentage point WER reduction — the cheapest accuracy win in the whole pipeline. The key engineering challenge was memory: naively loading 100M+ sentences into RAM requires 64GB+. The solution was stream-tokenizing one sentence at a time, reducing peak memory to ~200 MB regardless of corpus size.
What I Learned
Benchmark before you optimize. I assumed Whisper would be the strongest baseline. It wasn’t. Without SpeechBench, I would have spent many hours fine-tuning the wrong model.
Small languages need different strategies. English ASR benefits from scale (more data, bigger models). Lithuanian ASR benefits more from targeted fine-tuning on modest data (~43 hours) plus a good language model. The language model is cheap to build and provides a meaningful accuracy boost.
BatchNorm is a silent killer in fine-tuning. This cost me hours of debugging. The model appeared to train normally (loss decreased) but was actually memorizing the training set while forgetting everything else. Freezing BatchNorm is a one-line fix with enormous impact.
Cost is not a barrier. The entire research pipeline — benchmarking 26 models, fine-tuning a custom Lithuanian model, building language models from scratch — cost under $20 in cloud compute. The barriers to improving speech recognition for underserved languages are not financial; they’re knowledge and tooling.
Links
- SpeechBench — ASR benchmarking platform (26 models, 8 datasets)
- FineTuneParakeet — Lithuanian fine-tuning pipeline
- asr-lm-builder — Universal token-level n-gram LM builder
- lt-asr-lm — Lithuanian ASR language model toolkit
- Fine-tuned model on HuggingFace
- SpeechBench Dashboard