{"record":{"id":"6b94a761efb497cf","repo":"babysor/MockingBird","slug":"model-folder-voc-models-dirt-doesn-t-exist-6b94a7","errorCode":null,"errorMessage":"Model folder {VOC_MODELS_DIRT} doesn't exist.","messagePattern":"Model folder (.+?) doesn't exist\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"control/mkgui/app_vc.py","lineNumber":48,"sourceCode":"    audio_input_selection = Enum('samples', list((file.name, file) for file in Path(AUDIO_SAMPLES_DIR).glob(\"*.wav\")))\n# Pre-Load models\nif os.path.isdir(EXT_MODELS_DIRT):    \n    extractors =  Enum('extractors', list((file.name, file) for file in Path(EXT_MODELS_DIRT).glob(\"**/*.pt\")))\n    print(\"Loaded extractor models: \" + str(len(extractors)))\nelse:\n    raise Exception(f\"Model folder {EXT_MODELS_DIRT} doesn't exist.\")\n\nif os.path.isdir(CONV_MODELS_DIRT):    \n    convertors =  Enum('convertors', list((file.name, file) for file in Path(CONV_MODELS_DIRT).glob(\"**/*.pth\")))\n    print(\"Loaded convertor models: \" + str(len(convertors)))\nelse:\n    raise Exception(f\"Model folder {CONV_MODELS_DIRT} doesn't exist.\")\n\nif os.path.isdir(VOC_MODELS_DIRT):    \n    vocoders =  Enum('vocoders', list((file.name, file) for file in Path(VOC_MODELS_DIRT).glob(\"**/*gan*.pt\")))\n    print(\"Loaded vocoders models: \" + str(len(vocoders)))\nelse:\n    raise Exception(f\"Model folder {VOC_MODELS_DIRT} doesn't exist.\")\n\nclass Input(BaseModel):\n    local_audio_file: audio_input_selection = Field(\n        ..., alias=\"输入语音（本地wav）\",\n        description=\"选择本地语音文件.\"\n    )\n    upload_audio_file: FileContent = Field(default=None, alias=\"或上传语音\",\n        description=\"拖拽或点击上传.\", mime_type=\"audio/wav\")\n    local_audio_file_target: audio_input_selection = Field(\n        ..., alias=\"目标语音（本地wav）\",\n        description=\"选择本地语音文件.\"\n    )\n    upload_audio_file_target: FileContent = Field(default=None, alias=\"或上传目标语音\",\n        description=\"拖拽或点击上传.\", mime_type=\"audio/wav\")\n    extractor: extractors = Field(\n        ..., alias=\"编码模型\", \n        description=\"选择语音编码模型文件.\"\n    )","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/control/mkgui/app_vc.py#L30-L66","documentation":"Startup guard in mkgui/app_vc.py for the vocoder models directory (VOC_MODELS_DIRT), globbing '**/*gan*.pt' for vocoder checkpoints. Missing folder aborts the app at import time.","triggerScenarios":"Starting the VC GUI when the vocoder models directory does not exist.","commonSituations":"Vocoder weights not downloaded for the VC pipeline; directory moved; models bundle extracted into a different root.","solutions":["Create the vocoder models folder and place a *gan*.pt checkpoint inside","Download the pretrained vocoder and extract to the expected path","Verify VOC_MODELS_DIRT in the config"],"exampleFix":"# before: vocoder/saved_models missing\nmkdir -p vocoder/saved_models\ncp hifigan_v1.pt vocoder/saved_models/\n# after: app import succeeds","handlingStrategy":"validation","validationCode":"voc_dir = Path(VOC_MODELS_DIRT)\nif not voc_dir.is_dir() or not list(voc_dir.glob('**/*gan*.pt')):\n    raise SystemExit(f'Vocoder missing in {voc_dir}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Preflight-check VC model dirs before launch","Automate vocoder weight download","Keep 'gan' naming convention for vocoder checkpoints"],"tags":["python","models","filesystem","mkgui","vocoder","startup"],"backgroundTag":"missing-model-directory","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}