{"record":{"id":"0df51df63e9ba04a","repo":"microsoft/VibeVoice","slug":"no-voice-preset-pt-files-found-in-voices-dir","errorCode":null,"errorMessage":"No voice preset (.pt) files found in {voices_dir}","messagePattern":"No voice preset \\(\\.pt\\) files found in (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"demo/web/app.py","lineNumber":138,"sourceCode":"        )\n        self.model.set_ddpm_inference_steps(num_steps=self.inference_steps)\n\n        self.voice_presets = self._load_voice_presets()\n        preset_name = os.environ.get(\"VOICE_PRESET\")\n        self.default_voice_key = self._determine_voice_key(preset_name)\n        self._ensure_voice_cached(self.default_voice_key)\n\n    def _load_voice_presets(self) -> Dict[str, Path]:\n        voices_dir = BASE.parent / \"voices\" / \"streaming_model\"\n        if not voices_dir.exists():\n            raise RuntimeError(f\"Voices directory not found: {voices_dir}\")\n\n        presets: Dict[str, Path] = {}\n        for pt_path in voices_dir.rglob(\"*.pt\"):\n            presets[pt_path.stem] = pt_path\n\n        if not presets:\n            raise RuntimeError(f\"No voice preset (.pt) files found in {voices_dir}\")\n\n        print(f\"[startup] Found {len(presets)} voice presets\")\n        return dict(sorted(presets.items()))\n\n    def _determine_voice_key(self, name: Optional[str]) -> str:\n        if name and name in self.voice_presets:\n            return name\n\n        default_key = \"en-Carter_man\"\n        if default_key in self.voice_presets:\n            return default_key\n\n        first_key = next(iter(self.voice_presets))\n        print(f\"[startup] Using fallback voice preset: {first_key}\")\n        return first_key\n\n    def _ensure_voice_cached(self, key: str) -> Tuple[object, Path, str]:\n        if key not in self.voice_presets:","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/microsoft/VibeVoice/blob/94da20d98b2fa7688e9cbfaf7692ddb4954f7600/demo/web/app.py#L120-L156","documentation":"Raised by StreamingTTSService._load_voice_presets when the voices directory exists but contains no .pt files anywhere under it (rglob finds nothing). This means the download step created the folder but the presets were never placed there — partial or failed download, wrong subdirectory, or files with a different extension.","triggerScenarios":"demo/voices/streaming_model exists but is empty; presets were downloaded to the wrong directory (e.g. demo/voices root instead of streaming_model/); files renamed to something other than .pt; download script interrupted mid-way leaving an empty dir.","commonSituations":"Interrupted download_experimental_voices.sh; git LFS placeholders not pulled; presets manually moved; directory created manually as a placeholder.","solutions":["Re-run demo/download_experimental_voices.sh and let it finish; confirm .pt files appear under demo/voices/streaming_model.","Check for misplaced files: find demo/voices -name '*.pt' and move them into demo/voices/streaming_model if they are one level off.","If files came from git LFS, run git lfs pull so placeholders become real .pt weights.","Verify file integrity (non-zero size, loadable via torch.load) after download."],"exampleFix":"# before\nmkdir -p demo/voices/streaming_model  # empty dir -> RuntimeError\n\n# after\nbash demo/download_experimental_voices.sh\nfind demo/voices/streaming_model -name '*.pt' | wc -l  # > 0","handlingStrategy":"validation","validationCode":"from pathlib import Path\nvoices = Path(\"demo/voices/streaming_model\")\npts = list(voices.rglob(\"*.pt\")) if voices.exists() else []\nif not pts:\n    raise SystemExit(\"No .pt presets. Re-run demo/download_experimental_voices.sh (and git lfs pull if applicable).\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify download script exit code","git lfs pull after cloning when presets are LFS-tracked","Check files land in demo/voices/streaming_model, not demo/voices"],"tags":["web-demo","startup","voice-preset","empty-directory","download"],"backgroundTag":null,"analyzedSha":"94da20d98b2fa7688e9cbfaf7692ddb4954f7600","analyzedAt":"2026-08-15T04:12:07.418Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}