Files
hyperframes/packages
Rajan Pantha 18409c9f27 fix(cli): keep phrase-level CJK and Thai transcripts as separate cues (#3436)
* fix(cli): keep phrase-level CJK and Thai transcripts as separate cues

wordsToCues inferred whether entries were already grouped into phrases
by testing for internal whitespace. Chinese, Japanese, Thai and the
other scripts written without inter-word spaces never satisfy that
test, so their phrase-level transcripts were treated as word-level and
re-grouped into a single cue covering the whole clip.

A three-phrase Chinese transcript produced one cue; the same transcript
in English produced three. The failure was silent: the export
succeeded, and the user found out by watching the captions.

For entries with no whitespace at all, fall back to entry length when
they are in a spaceless script. Whisper emits word-level tokens for
those scripts one or two characters at a time, while a phrase-level cue
runs to several times that. The median is used so one long token cannot
declare word-level input pre-grouped, and a couple of short cues cannot
declare a real transcript word-level.

--preserve-cues still forces the same thing, and behaviour for
space-separated scripts is unchanged.

Fixes #3353

* test(cli): pin the spaceless phrase length threshold
2026-08-26 20:17:25 +00:00
..
2026-08-26 03:23:41 +00:00
2026-08-26 03:23:41 +00:00
2026-08-26 03:23:41 +00:00
2026-08-26 03:23:41 +00:00
2026-08-26 03:23:41 +00:00
2026-08-26 03:23:41 +00:00