Detect the language once for auto-detect file passes on the chunked path (D-053)
Transformers.js has no Whisper language detection and silently decoded Danish as English whenever "Skip silence" was off or unavailable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3583d60847
commit
dd9dfc628b
6 files changed
+112
-6
No files matched your search
@@ -163,6 +163,9 @@ environment). See `WorkBreakdown.md` for the itemized checklist.)
|
||||
(`VocabularyHint`, stored in localStorage by `lib/hint.ts`), raw as typed (D-048).
|
||||
5. Worker runs the pipeline (chunked, with timestamps), streaming partial results
|
||||
back via `{type:"partial"}` messages; final result as `{type:"result"}`.
|
||||
With auto-detect on a multilingual model, it first detects the language on
|
||||
the first 30 s (`worker/language.ts`, D-053) and pins it — Transformers.js
|
||||
itself would default to English.
|
||||
A hint becomes `<|startofprev|> hint.` once per pass (`worker/prompt.ts`,
|
||||
cut to a 120-token prompt budget at a whole word) and is prepended
|
||||
to the decoder input of every 30 s window by a wrapper around the model's
|
||||
|
||||
Reference in new issue
Block a user