4 Commits
Author SHA1 Message Date
Chi-Wei Lee d77b31d8c2 fix: retain unpunctuated tail in sentence timestamps (#3754) 2026-10-08 14:07:12 +08:00
Mohammad Hijjawi b0fa25b12c fix: keep token separators in timestamp_sentence raw_text (#3746)
timestamp_sentence() stripped the trailing space from sentence_text_seg
on every token instead of once when the sentence is emitted, so the
per-sentence raw_text lost all separators ("iphone pro max" became
"iphonepromax"). Trim it only at the sentence boundary, as
timestamp_sentence_en() already does.
2026-10-01 12:48:39 +08:00
Chi-Wei Lee be7557f27c fix: stop timestamp_sentence_en reusing a stale sentence start (#3741)
When punc_id_list is longer than timestamp_postprocessed (a mismatch
the function already logs a warning for), the entries past the end of
timestamp_postprocessed get timestamp=None from zip_longest. For the
sentence that starts on one of those entries, the is_sentence_start
flag was consumed unconditionally on the first iteration regardless of
whether timestamp was None, so sentence_start kept whatever value was
left over from the previous, unrelated sentence instead of being
reported as unknown.

The sibling function timestamp_sentence already handles this correctly
by resetting sentence_start to None after each flush and only setting
it once a real timestamp shows up. Mirror that logic here instead of
the one-shot is_sentence_start flag.

Before: a trailing sentence whose first word has no timestamp gets
start reused from the previous sentence (wrong, looks valid).
After: start is None for that sentence, matching timestamp_sentence.
2026-09-30 22:52:09 +08:00
LauraGPTandAmir Fathi 0a90cb5ca1 fix: guard empty English timestamp segments
Avoid indexing empty sentence buffers when punctuation and timestamp entries outnumber split words, and add regression coverage for whitespace-only input.

Co-authored-by: Amir Fathi <[email protected]>
Signed-off-by: LauraGPT <[email protected]>
2026-08-28 13:41:27 +00:00