{"record":{"id":"ddb87f221dadc76e","repo":"cjpais/Handy","slug":"failed-to-load-parakeet-model","errorCode":null,"errorMessage":"Failed to load parakeet model {}: {}","messagePattern":"Failed to load parakeet model (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":645,"sourceCode":"                     supports_translate={}, supports_language_detect={})\",\n                    model_id,\n                    backend,\n                    requested_device,\n                    bound_backend,\n                    bound_device,\n                    caps.supports_streaming,\n                    caps.supports_translate,\n                    caps.supports_language_detect\n                );\n                LoadedEngine::TranscribeCpp(session)\n            }\n            EngineType::Parakeet => {\n                let engine =\n                    ParakeetModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                        let error_msg =\n                            format!(\"Failed to load parakeet model {}: {}\", model_id, e);\n                        emit_loading_failed(&error_msg);\n                        anyhow::anyhow!(error_msg)\n                    })?;\n                LoadedEngine::Parakeet(engine)\n            }\n            EngineType::Moonshine => {\n                let engine = MoonshineModel::load(\n                    &model_path,\n                    MoonshineVariant::Base,\n                    &Quantization::default(),\n                )\n                .map_err(|e| {\n                    let error_msg = format!(\"Failed to load moonshine model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::Moonshine(engine)\n            }\n            EngineType::MoonshineStreaming => {\n                let engine = StreamingModel::load(&model_path, 0, &Quantization::default())","sourceCodeStart":627,"sourceCodeEnd":663,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L627-L663","documentation":"Raised when ParakeetModel::load(path, Quantization::Int8) fails to load an ONNX-based Parakeet model via transcribe-rs. Failures come from the ONNX runtime layer: unreadable/corrupt .onnx files, missing companion files for the model directory, unsupported opset, or execution-provider init failure. A 'loading_failed' event is emitted with the same message before the error is returned.","triggerScenarios":"Selecting a Parakeet model whose ONNX files are corrupt or incompletely downloaded; opset/operators unsupported by the bundled onnxruntime; provider (e.g. CUDA/CoreML) unavailable on the machine; quantized graph incompatible with the runtime build.","commonSituations":"Interrupted model downloads leaving truncated .onnx files; onnxruntime version drift after dependency updates; machines without the expected acceleration providers; models added by hand into the models directory without all required files.","solutions":["Re-download the Parakeet model from the catalog (downloads are hash-verified, guaranteeing intact files).","Restart the app after changing accelerator settings so a fresh ONNX session/provider is initialized.","Try CPU acceleration to rule out a missing execution provider.","If it persists after a clean re-download, the model's opset may exceed the bundled runtime — report the model id and app version."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Verify all expected ONNX files exist before loading\nfor f in [\"model.onnx\", \"vocab.json\"] {\n    if !model_path.join(f).exists() {\n        anyhow::bail!(\"parakeet model incomplete: missing {} in {}\", f, model_path.display());\n    }\n}","typeGuard":null,"tryCatchPattern":"match ParakeetModel::load(&model_path, &Quantization::Int8) {\n    Ok(m) => Ok(m),\n    Err(e) => {\n        warn!(\"parakeet Int8 failed ({e}); retrying default quantization on CPU\");\n        set_accelerator_cpu();\n        ParakeetModel::load(&model_path, &Quantization::default())\n    }\n}","preventionTips":["Load ONNX models only from hash-verified catalog downloads.","Restart the app after changing accelerator settings so providers re-initialize cleanly.","Pin onnxruntime-compatible model versions in the catalog; reject opsets newer than the bundled runtime.","On provider-less machines, default Parakeet to CPU to avoid provider init failures."],"tags":["parakeet","onnx","transcribe-rs","model-load","quantization"],"backgroundTag":"model-load-failed","analyzedSha":"ba10ce1943ef34e93c09494027fc0b9ced2e8a44","analyzedAt":"2026-08-17T10:29:55.597Z","contentChangedAt":"2026-08-17T10:29:55.597Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}