YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

parakeet-canadian-tooling

Reproducible tooling for Canadian English spelling evaluation of ASR models, and for adapting Parakeet TDT to Canadian spelling.

This repository accompanies luvette/parakeet-tdt-0.6b-v3-ca.

It is released separately because the evaluation methodology is the durable output here, and because it contains the negative results that keep anyone from repeating the dead ends.


What is in here

parakeet_lib/
  ca_spelling.py    source-verified Canadian spelling dictionary (v1.0.0), FROZEN
  ca_eval.py        two-metric scorer + speaker-level bootstrap
  text.py           WER / CER / normalisation with matched contraction handling
  transcripts.py    reference transcription normaliser
  audio.py          robust mp3 decoding (soundfile + ffmpeg cross-check)
scripts/
  wer_attribution.py   conventional vs spelling-normalized WER, error attribution
  longform_eval.py     long-form dictation, noise robustness, punctuation/caps
  select_ckpt.py       checkpoint selection by measured quality (not val loss)
  interpolate.py       LoRA weight interpolation between checkpoints
  canadianise_v2.py    label rewriting with the frozen dictionary
  build_balanced_mix.py  headword-balanced training mixture
  merge_and_verify.py  merge LoRA and verify structure + reload determinism
tests/
  test_spelling.py    18 tests: denominators, duplicates, filtering, fixed/broken
methodology/
  METHODOLOGY.json    frozen methodology + SHA-256 of the scoring code
  FROZEN.sha256       hashes of the dictionary, scorer and tests
results/
  wbs_test.json           sealed-test WER attribution + bootstrap
  longform.json           long-form and noise results
  selection.json          checkpoint comparison
  ca_eval_v2.json         two-metric spelling scores
  split_report.json       speaker-disjoint split sizes

The dictionary

ca-en-spelling-1.0.0 β€” 109 entries. Every entry carries:

dict(
    preferred="colour",        # Canadian-preferred form
    acceptable=(),             # other acceptable Canadian forms
    nonstandard=("color",),    # NOT standard Canadian
    context=None,              # e.g. "NOUN ... VERB is 'practise'"
    us_form="color",
    source="https://our-languages.canada.ca/en/writing-tips-plus/...",
)

Primary authority: Language Portal of Canada β€” Writing Tips Plus.

Two metrics, deliberately separate

Metric Question it answers
preference accuracy Did the model emit the preferred Canadian form?
orthography accuracy Did it emit the preferred form or any acceptable form?

jewellery is preferred; jewelry is acceptable. A model emitting jewelry is not making a transcription error, so orthography accuracy is the metric that reflects output quality, and preference accuracy measures style.

Mixing these two up is the single easiest way to misreport Canadian ASR quality.

Documented dictionary corrections

An earlier version of this dictionary treated British forms as Canadian. It was wrong and has been corrected. Verified against the Language Portal:

  • program, never programme β€” Canada follows US usage here
  • grey preferred, gray acceptable β€” both correct in Canada
  • jewellery preferred, jewelry acceptable β€” Canadian writers prefer the double l
  • realize / realise both acceptable β€” -ize is standard Canadian, not American-only
  • tire, curb, aluminum β€” Canadian matches US, not British tyre/kerb/aluminium

Reproducing the evaluation

pip install -r requirements.txt   # transformers, torch, polars, polars, pytest

# Run the tests first β€” they encode the scoring rules
python -m pytest tests/ -q

# Score a model on the Canadian dev split
python -m parakeet_lib.ca_eval "base=nvidia/parakeet-tdt-0.6b-v3" \
                               "cand=luvette/parakeet-tdt-0.6b-v3-ca"

# Conventional vs spelling-normalized WER + error attribution
python scripts/wer_attribution.py --split test

# Long-form / noise / punctuation
python scripts/longform_eval.py --models "base=nvidia/..." "cand=luvette/..."

Negative results (please don't repeat these)

Approach Outcome
Encoder-only LoRA Spelling unchanged. The decision is made in the prediction/joint networks.
Synthetic TTS mixtures (10/20/30%) No improvement. The 30% point estimate was worse, but the CI included zero, so no significant degradation was established either way.
Headword-balanced oversampling + continuation Regressed 83.1% β†’ 77.4%. Targeted repetition of a few failure clips erodes rather than refines.
Clean re-adaptation from base 79.0% β€” did not beat the current best on orthography.
Weight interpolation Trades WER against orthography; no point dominated.
Training past ~700–1050 steps Overtraining: spelling declines while loss keeps falling.
Selecting checkpoints by validation loss Wrong selector. Best-loss checkpoints scored consistently worse on spelling.

Requirements

torch>=2.6
transformers>=5.6
polars
soundfile
pytest

ffmpeg on PATH is recommended as a decode cross-check.

Licence

Tooling: MIT.

The dictionary encodes spelling facts sourced from the Government of Canada's Language Portal. The factual preferences are not copyrightable; the URLs are provided so anyone can verify each decision.

Model weights and results are under CC BY 4.0, inherited from nvidia/parakeet-tdt-0.6b-v3.

Attribution

Base model Β© NVIDIA, CC BY 4.0. This derivative carries the same licence and must retain NVIDIA attribution.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support