Skip to content

fix(tts): preserve subtitle durations when shifting lines - #105

Open
nateEc wants to merge 1 commit into
abus-aikorea:mainfrom
nateEc:codex/issue-26-subtitle-shift-duration
Open

fix(tts): preserve subtitle durations when shifting lines#105
nateEc wants to merge 1 commit into
abus-aikorea:mainfrom
nateEc:codex/issue-26-subtitle-shift-duration

Conversation

@nateEc

@nateEc nateEc commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Adds a shared helper for shifting subtitle start times while preserving original durations.
  • Applies it across Edge, Azure, F5, CosyVoice, Kokoro, and RVC subtitle TTS paths.
  • Removes duplicated timing math that could shrink a following subtitle after mutating its start time.

Fixes another timing cause behind #26.

Verification

  • rg -n "next_line\.start = len|next_line\.end = next_line\.start" app/abus_tts_*.py || true
  • python3 -m py_compile app/abus_audio.py app/abus_tts_edge.py app/abus_tts_azure.py app/abus_tts_f5.py app/abus_tts_cosyvoice.py app/abus_tts_kokoro.py app/abus_tts_rvc.py

- Add a shared helper for moving subtitle starts without shrinking durations.

- Use the helper across Edge, Azure, F5, CosyVoice, Kokoro, and RVC subtitle TTS paths.

- Remove the duplicated expression that recalculated durations after mutating start times.

- Verified with rg scan and python3 -m py_compile on the touched modules.
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