Skip to content

Use stock English Whisper for the English→Chin direction - #16

Merged
trinitron88 merged 1 commit into
mainfrom
feature/english-asr-en2cnh
Jun 15, 2026
Merged

Use stock English Whisper for the English→Chin direction#16
trinitron88 merged 1 commit into
mainfrom
feature/english-asr-en2cnh

Conversation

@trinitron88

Copy link
Copy Markdown
Owner

Fixes the "street → strih" garbling in English→Chin mode.

Cause

The cnh-fine-tuned model specialized on Hakha Chin and lost English ASR fidelity (catastrophic-forgetting-lite). In en→cnh mode it was used to transcribe English, so it re-spelled English words into Chin phonetics — "street" → "strih" — and the bad token then passed through translation into both transcript lines.

Fix

  • english_asr_model() lazily loads a stock English Whisper (EN_ASR_MODEL, default small.en) on first en→cnh use — zero cost if that direction is never used. Falls back to the fine-tuned model if it can't load.
  • on_utterance routes en→cnh through the English model; cnh→en keeps the fine-tuned model (its strength, unaffected).
  • en→cnh translation already worked (DIRECTIONS["en2cnh"] = sl=en, tl=cnh, line ~341) — no change needed there, confirmed.
  • APP_VERSIONv5.2.0-enasr; README documents EN_ASR_MODEL.

Notes

  • Safe: lazy load + fallback, so it can't break boot or the cnh→en path.
  • Memory: adds a small English model (default small.en, ~244M) on the GPU, only when en→cnh is first used.
  • Built on top of the now-merged caching (Implement translation + TTS caching (real code) #15) and source-defined version.

Deploy test: CT_BRANCH=feature/english-asr-en2cnh python hf_space/deploy_colab.py, switch to English → Hakha Chin, say "live on a street" — the source line should read real English now, and the Chin translation should follow.

🤖 Generated with Claude Code

The cnh-fine-tuned model specialized on Hakha Chin and degraded at English ASR,
re-spelling English words into Chin phonetics ('street' → 'strih'). For the
en→cnh direction, transcribe English with a stock English Whisper (EN_ASR_MODEL,
default small.en) and then translate en→cnh (already wired via DIRECTIONS).

- english_asr_model(): lazily loads the stock English model on first en→cnh use
  (zero cost otherwise); falls back to the fine-tuned model if it can't load.
- on_utterance: en→cnh uses the English model; cnh→en keeps the fine-tuned one.
- APP_VERSION → v5.2.0-enasr; README documents EN_ASR_MODEL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@trinitron88
trinitron88 merged commit cd18225 into main Jun 15, 2026
@trinitron88
trinitron88 deleted the feature/english-asr-en2cnh branch June 15, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant