Skip to content

Route VTT subtitle output to batch folders and temp fallback for UI remounts#1218

Draft
ChuxiJ with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-vtt-saving-location
Draft

Route VTT subtitle output to batch folders and temp fallback for UI remounts#1218
ChuxiJ with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-vtt-saving-location

Conversation

Copilot AI commented May 23, 2026

Copy link
Copy Markdown
Contributor

.vtt subtitles were being written to a global gradio_outputs/subtitles path, separating them from their generated audio batch artifacts and creating avoidable workspace clutter during UI subtitle refreshes. This update aligns subtitle output with per-batch audio output and moves UI-only fallback files to OS temp storage.

  • Subtitle output routing

    • lrc_to_vtt_file(...) now accepts output_dir.
    • If provided, VTT is written there; otherwise it falls back to tempfile.gettempdir()/acestep_subtitles (instead of a hardcoded project folder).
  • Auto-LRC path alignment

    • _run_auto_lrc(...) now accepts output_dir and forwards it to lrc_to_vtt_file(...).
    • generate_with_progress(...) passes the active temp_dir (batch_[timestamp]) into _run_auto_lrc(...), so auto-generated subtitles are colocated with batch audio.
  • Manual LRC path alignment

    • generate_lrc_handler(...) now derives the sample’s batch directory from audio_paths and passes that directory to lrc_to_vtt_file(...).
    • Manual subtitle generation now writes beside the corresponding sample audio instead of a global subtitle directory.
  • Focused coverage updates

    • Added assertions for custom output_dir and OS-temp fallback behavior.
    • Added checks that manual and auto LRC paths forward the expected output directory.
def lrc_to_vtt_file(lrc_text: str, total_duration: float = None, output_dir: Optional[str] = None):
    vtt_output_dir = output_dir or os.path.join(tempfile.gettempdir(), "acestep_subtitles")
    ...

Copilot AI changed the title [WIP] Fix bug with .vtt subtitles saving location Route VTT subtitle output to batch folders and temp fallback for UI remounts May 23, 2026
Copilot finished work on behalf of ChuxiJ May 23, 2026 03:33
Copilot AI requested a review from ChuxiJ May 23, 2026 03:33
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.

Bug: Subtitles (.vtt) saving in isolated 'subtitles' folder instead of audio batch_ folders

2 participants