Journey to AI Engineering #3: Did Fine-Tuning Whisper Small Actually Help?

7 min read0 views

FLEURS word error rate, golden holdout amounts, and two training runs. What improved, what the evaluation gate proved, and what it did not.

System DesignProblem Dissection

In Part 2, I ended with training still in progress and three questions I wanted the experiment to answer.

This post reports what happened after that run finished, mostly on the day after Part 2 went live. I compare stock Whisper Small against two fine-tuned checkpoints, on general Indonesian speech and on expense-specific amount accuracy. Browser deployment and latency are a separate problem; I'll cover those in Part 4.

Picking up from Part 2

Part 2 framed three questions:

  1. Does fine-tuning actually improve recognition? Measured with word error rate (WER) on a held-out test set.
  2. Does it work better on financial speech? Measured separately, because a better WER does not guarantee correct amounts.
  3. Can the model run efficiently at the edge? Quantization, size, and runtime in the browser.

This post answers the first two. The third needs the ONNX export and the web app, not just a successful Colab run.

What I trained

I kept one base model: openai/whisper-small. Training uses the pasak Python package under my project repo, with a Colab notebook as a thin wrapper and no duplicate training logic in the notebook.

The recipe is intentionally small-team sized:

  • Indonesian transcription (language=indonesian, task=transcribe).
  • Hugging Face Seq2SeqTrainer with batch size 1, gradient accumulation 8, learning rate 1e-5, up to three epochs.
  • Mixed precision on GPU when available.
  • Evaluation on the FLEURS test split during training, with early stopping if eval loss rises.
  • An out-of-memory path that freezes the encoder for the first epoch, then unfreezes it, which is practical on a Colab GPU and not a claim about model quality.

I ran two fine-tunes:

NameTraining dataRole
whisper-small-ftFLEURS Indonesian train onlyTest whether domain adaptation on general speech is enough
whisper-small-ft-goldenFLEURS train plus 80 expense-golden clipsTest whether a small in-domain mix improves both WER and amounts

The trainer optimizes transcripts only. Expected amounts in the golden set are for evaluation, not loss targets. That matters when you interpret the results: the model never directly learns "this phrase should parse to Rp15,000," only how people said it.

Two datasets, two different questions

I did not merge everything into one score.

FLEURS (id_id)

Google FLEURS provides general Indonesian speech. I used config id_id, field transcription, with 2,579 training utterances and 687 held-out test utterances. The test split is never used for training.

WER on this set answers: Did fine-tuning improve broad Indonesian ASR?

My promotion gate is strict: a fine-tune only "passes" if its test WER is strictly lower than stock Whisper Small on the same examples.

Golden dataset (expense domain)

The golden set is smaller and closer to the product. I recorded 100 short expense-style phrases (food, transport, ribu amounts, loanwords, quiet and loud takes). Each row has audio, a human transcript, and structured expected fields (amount, currency, and related labels). Examples are tagged clear or hard.

For training mix-in, I used 80 clips (sorted id order, 80/20 split). 20 ids are held out for scoring: 18 clear and 2 hard in the eval I report here.

This set answers: After transcription, does normalizeAmount get the money right? That is not the same as WER. A transcript can look almost correct while still breaking amount parsing.

Results: FLEURS test WER

Lower is better. All numbers are on the same 687 FLEURS test utterances.

CheckpointWERvs stock
Stock whisper-small36.1%baseline
whisper-small-ft (FLEURS only)17.2%about 52% relative reduction
whisper-small-ft-golden (FLEURS + golden)14.4%about 60% relative reduction

Both fine-tunes clear the gate I set (werFt < werStock). Adding the golden mix shaves roughly another 16% relative WER compared to FLEURS-only fine-tuning (17.2% → 14.4%).

On general Indonesian speech, fine-tuning Whisper Small made the largest difference in this experiment.

Results: golden holdout amounts

Here I score exact integer amount and currency on the 20 held-out golden clips, using the same normalization rules the app will use instead of character-level WER.

CheckpointOverall (20)Clear (18)Hard (2)
Stock whisper-small17 / 2015 / 182 / 2
whisper-small-ftnot scored——
whisper-small-ft-golden19 / 2017 / 182 / 2

I did not run amount scoring on the FLEURS-only checkpoint in the first evaluation pass. That is missing data in the report, not evidence that it scored zero.

The takeaway I care about is that golden-mix fine-tuning moved the domain metric as well as FLEURS WER. Stock Whisper was already decent on this tiny holdout (17/20), so the jump to 19/20 is a gain but easy to over-read: n = 20, and only two hard rows in the holdout.

This connects back to Part 2's motivation. A model can look "Indonesian" on paper and still stumble on phrases like "15,000 ribu." Improving general WER does not automatically fix that. The golden-mix model did better on the slice I measured, but without the FLEURS-only amount score I cannot say how much of that gain comes from the mix-in.

What happened after the numbers

The checkpoint I ship toward the browser is the golden fine-tune, exported to q8 ONNX (encoder plus merged decoder) and staged for local and CDN delivery. I assert the decoder language token for Indonesian (<|id|>) after export so I do not silently regress to English decoding.

That export is groundwork for Part 4. The tables above are PyTorch fp32 evaluation on my training stack, not a guarantee that the quantized browser bundle behaves identically.

Fine-tuning and export pipeline

What this does not prove

I want the limits on the record, because they bound what Part 3 can claim.

  • Browser q8 ONNX can differ from PyTorch. Quantization and ONNX Runtime Web are another system. Live tests can still fail on glued digits, loanwords, or other edge cases. I keep a previous spike bundle to roll back if q8 regresses.
  • The golden holdout is small. Twenty lines are enough to catch gross failure, not enough for a production SLA. The hard slice in holdout is only two examples.
  • FLEURS-only fine-tune amounts were not scored yet. I should run the same holdout on whisper-small-ft to see how much of the amount gain comes from golden mix-in versus FLEURS alone.
  • Mozilla Common Voice was prepared for but skipped in these runs; more diverse Indonesian speech might change the picture.
  • Phase 0 playground benches used a different golden path than this backend eval. I aligned the product on the backend golden v0 results reported here.

Answering Part 2's questions (so far)

Does fine-tuning improve recognition? Yes, on FLEURS id_id test, by a large margin.

Does it work better on financial speech? On the 20-clip golden holdout, the golden-mix model improves amount accuracy versus stock. That is encouraging but not conclusive at this sample size.

Can it run at the edge? Not settled in this post. Training success is only the first gate.

What comes next

Part 4 will follow the same checkpoint into the browser: Transformers.js, WebGPU and WASM fallback, local /models/ hosting, service worker caching, and the production issues that do not show up in jiwer: wrong MIME types, ORT wasm paths, and first-load size.

If you are following the series: Part 2 was the experiment design; Part 3 is the result readout. The product still has to prove itself on a phone, and a 687-utterance test set cannot show that.


I'd appreciate thoughts on how you would size a domain golden set for a voice finance app, and whether you would gate promotion on WER, amounts, or both.

Cheers!

Stay Updated

Get notified when I publish new ideas about technology, system design, and human-centered engineering.