Skip to content

fix(subtitles): split overlong source cues - #3574

Merged
LauraGPT merged 2 commits into
mainfrom
codex/fix-subtitle-long-cues
Aug 30, 2026
Merged

fix(subtitles): split overlong source cues#3574
LauraGPT merged 2 commits into
mainfrom
codex/fix-subtitle-long-cues

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • split a single overlong model sentence into bounded readable subtitle cues
  • preserve model word surfaces and per-token timestamps so English and multilingual cues retain real word/audio boundaries
  • pass aligned sentence words through both the CLI and subtitle example
  • keep the original model segment when timestamps are missing, malformed, unordered, unsupported, or contain an indivisible over-limit token instead of fabricating timing

Verification

  • PYTHONPATH=$PWD python -m pytest tests/test_cli.py tests/test_generate_subtitle.py -q -> 27 passed
  • python -m compileall -q funasr/cli.py examples/subtitle/generate_subtitle.py tests/test_cli.py
  • exact 10m33s reporter sample on H100: 84 cues with 26 over 8s before; 131 cues after, maximum 7.979s / 42 characters, with 0 over-limit cues, 0 overlaps, and 0 leading/trailing whitespace
  • repeated fresh inference produced SHA256 7617b91b3ef8ce23b650a38a6a52b7c03f1e8f0f15b82ce5d8caabd55db286d1
  • independent review: no remaining P1/P2 findings
  • git diff --check

Addresses the overlong-cue boundary reported in #3539. The issue remains open until the reporter verifies the result on the affected mixed-language recording.

Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
Signed-off-by: LauraGPT <18321252+LauraGPT@users.noreply.github.com>
@LauraGPT
LauraGPT merged commit 917ca2f into main Aug 30, 2026
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