Files
Ameya TanejaandClaude Fable 5 b9b43f7210 Fix runtime crashes: torchaudio/torchcodec I/O + guaranteed-missing reference
Two bugs made the flagship workflow unable to generate:

1. torchaudio >= 2.8 routes all load/save through torchcodec, which needs
   FFmpeg shared libs absent on many Windows installs ("Could not load
   libtorchcodec"). F5-TTS reads its reference via torchaudio.load internally,
   so this crashed every generation. Add ensure_audio_io(): probes torchcodec
   once and, if broken, shims torchaudio.load/save with soundfile (libsndfile,
   no FFmpeg). Own I/O (temp ref, default voice, export) uses soundfile directly.

2. F5 is a cloning model and always needs reference audio, but the flagship
   ships generic characters with no Voice Reference and no default voices were
   installed -> "no voice reference available" on every line. default_voice()
   now falls back to the reference clip bundled with f5-tts (and returns its
   known transcript, skipping the ~1.6 GB Whisper download). Clear error only
   if f5-tts itself isn't importable.

Workflow: replace the instructional placeholder dialogue with a short runnable
demo script; give Characters 2 and 3 distinct profiles so it shows range out of
the box. README: document the soundfile shim, bundled default voice, and the
dependency-prune / slow-start note.

Verified end-to-end (engine load -> F5 infer -> DSP -> soundfile export).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 03:07:25 +05:30
..