Skip to content

fix: stream audio for Consolidate by Character export in stream-only …#1061

Merged
LeviXIII merged 5 commits into
mainfrom
1060-bug-audio-exports-for-consolidate-by-character-only-work-in-auto-download-mode
Jun 29, 2026
Merged

fix: stream audio for Consolidate by Character export in stream-only …#1061
LeviXIII merged 5 commits into
mainfrom
1060-bug-audio-exports-for-consolidate-by-character-only-work-in-auto-download-mode

Conversation

@Luke-Bilhorn

Copy link
Copy Markdown
Contributor

PR Title

1060-Audio Exports for Consolidate by Character only works in auto-download mode

Summary

Closes #1060

Makes Consolidate-by-Character exporting work with all stream/download modes.

Claude: "Consolidate by Character now resolves audio via the same LFS streaming path as Include Audio, so export works in stream-only/stream-and-save (not just auto-download)."

Changes

  • Extracted shared setupAudioStreaming + exported resolveAudioBytes from audioExporter.ts
  • Character export downloads LFS clips to temp files for FFmpeg, with retry/cache/concurrency
  • Honors selectedMilestonesByFile; supports cancellation
  • Clear error when streaming setup or all downloads fail (no silent "0 files written")

Testing Checklist

Consolidate by Character

  • Works in stream-and-save with LFS pointers (no "0 files written")
  • Works in auto-download with local files
  • One .wav per character label; clips DAW-align from 0:00
  • Per-milestone selection respected

Regression

  • Include Audio still works in stream-and-save
  • Include Audio with Timestamps still works (.wav output)

Screenshots

N/A

…mode

Consolidate by Character only checked for local files (pathExists), so in
stream-only mode every clip was dropped and the export wrote 0 files. Reuse
the per-cell exporter's LFS streaming path: extract resolveAudioBytes and a
shared setupAudioStreaming helper from audioExporter, then resolve each unique
clip source (downloading LFS objects with retry + the shared cache) into temp
files for FFmpeg. Also honor selectedMilestonesByFile, support cancellation,
and surface a clear error instead of a silent "0 files written".
@Luke-Bilhorn Luke-Bilhorn linked an issue Jun 20, 2026 that may be closed by this pull request
37 tasks

@LeviXIII LeviXIII left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having the toast with the progress when preparing the content, it should follow the same pattern of having the Download box show what is happening. The toast stops after the content is prepared, but I don't know how the other processes are moving. If I cancel, it does stop everything, but it should show me at which point I am cancelling.

Basically, make it work like it does for the other audio formats.

Image

@LeviXIII LeviXIII left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also is not working: Download retry/backoff works on transient network failure.

Need to go though the test checklist on the main ticket to make sure those points are still working.

Luke-Bilhorn and others added 2 commits June 23, 2026 21:46
Route progress, errors, completion, and cancellation through the shared
ExportProgressReporter so Consolidate by Character renders in the same
stage-based download box as Include Audio (and the cancel state is visible).
Replaces the prior withProgress notification + toast pattern.
@Luke-Bilhorn

Copy link
Copy Markdown
Contributor Author

I think all of this is fixed... and I did an odious amount of testing to make sure.

Haven't yet tested multi-milestone consolidation (didn't have a file for it, but I could go figure out how to make a vtt for this) or when frontier unavailable (It was still working somehow when I was signed out). But other than these it seems pretty solid.

@LeviXIII LeviXIII left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well now. If a character is not in the milestone section that is chosen and doesn't have any other speaking parts in the chosen milestone, it will not write out their file.

@LeviXIII LeviXIII merged commit baa1db9 into main Jun 29, 2026
3 checks passed
@LeviXIII LeviXIII deleted the 1060-bug-audio-exports-for-consolidate-by-character-only-work-in-auto-download-mode branch June 29, 2026 19:55
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: Audio Exports for Consolidate by Character only work in auto-download mode

2 participants