microsoft/VibeVoice · critical · RuntimeError
Voices directory not found: {voices_dir}
Error message
Voices directory not found: {voices_dir} What it means
Raised by StreamingTTSService._load_voice_presets during service load: it expects the directory <repo>/demo/voices/streaming_model (BASE.parent / 'voices' / 'streaming_model') to exist and contain the streaming voice presets. If the folder is missing, startup aborts with RuntimeError. The preset .pt files are typically fetched by demo/download_experimental_voices.sh and are not part of the git tree.
Source
Thrown at demo/web/app.py:131
self.model.eval()
self.model.model.noise_scheduler = self.model.model.noise_scheduler.from_config(
self.model.model.noise_scheduler.config,
algorithm_type="sde-dpmsolver++",
beta_schedule="squaredcos_cap_v2",
)
self.model.set_ddpm_inference_steps(num_steps=self.inference_steps)
self.voice_presets = self._load_voice_presets()
preset_name = os.environ.get("VOICE_PRESET")
self.default_voice_key = self._determine_voice_key(preset_name)
self._ensure_voice_cached(self.default_voice_key)
def _load_voice_presets(self) -> Dict[str, Path]:
voices_dir = BASE.parent / "voices" / "streaming_model"
if not voices_dir.exists():
raise RuntimeError(f"Voices directory not found: {voices_dir}")
presets: Dict[str, Path] = {}
for pt_path in voices_dir.rglob("*.pt"):
presets[pt_path.stem] = pt_path
if not presets:
raise RuntimeError(f"No voice preset (.pt) files found in {voices_dir}")
print(f"[startup] Found {len(presets)} voice presets")
return dict(sorted(presets.items()))
def _determine_voice_key(self, name: Optional[str]) -> str:
if name and name in self.voice_presets:
return name
default_key = "en-Carter_man"
if default_key in self.voice_presets:
return default_keyView on GitHub (pinned to 94da20d98b)
Solutions
- Run demo/download_experimental_voices.sh to fetch the preset .pt files into demo/voices/streaming_model.
- Verify demo/voices/streaming_model exists and contains *.pt files (e.g. en-Carter_man.pt) before starting the app.
- If deploying, copy the voices/streaming_model directory next to the web app so BASE.parent/voices/streaming_model resolves.
- Check for a nested-directory mistake: the script must produce demo/voices/streaming_model, not demo/voices alone.
Example fix
# before uvicorn web.app:app # RuntimeError: Voices directory not found # after bash demo/download_experimental_voices.sh ls demo/voices/streaming_model/*.pt # en-Carter_man.pt ... uvicorn web.app:app
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
voices = Path(__file__).resolve().parent / "voices" / "streaming_model"
if not voices.is_dir():
raise SystemExit(f"Missing {voices}. Run demo/download_experimental_voices.sh first.")
# then start the app Prevention
- Run the voice download script as part of setup/deployment
- Add a preflight check for demo/voices/streaming_model before uvicorn starts
- Include the voices directory in deployment artifacts
When it happens
Trigger: Starting demo/web/app.py (FastAPI startup event) when demo/voices/streaming_model does not exist — fresh clone without running the voice download script, or running app.py from a different checkout/layout so BASE.parent points somewhere without voices/.
Common situations: Fresh clone; download_experimental_voices.sh never run or failed; the web demo deployed by copying only app.py/static files without the voices directory; wrong working directory changing BASE resolution.
Related errors
- No voice preset (.pt) files found in {voices_dir}
- MODEL_PATH not set in environment
- Voice preset {key!r} not found
- Multiple voice presets match the speaker name '{speaker_name
- StreamingTTSService not initialized
AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15).
Data as JSON: /api/errors/980b7a0d649761b9.
Report an issue: GitHub.