{"record":{"id":"02e23274e196bcfe","repo":"cjpais/Handy","slug":"failed-to-load-sensevoice-model","errorCode":null,"errorMessage":"Failed to load SenseVoice model {}: {}","messagePattern":"Failed to load SenseVoice model (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":680,"sourceCode":"            EngineType::MoonshineStreaming => {\n                let engine = StreamingModel::load(&model_path, 0, &Quantization::default())\n                    .map_err(|e| {\n                        let error_msg = format!(\n                            \"Failed to load moonshine streaming model {}: {}\",\n                            model_id, e\n                        );\n                        emit_loading_failed(&error_msg);\n                        anyhow::anyhow!(error_msg)\n                    })?;\n                LoadedEngine::MoonshineStreaming(engine)\n            }\n            EngineType::SenseVoice => {\n                let engine =\n                    SenseVoiceModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                        let error_msg =\n                            format!(\"Failed to load SenseVoice model {}: {}\", model_id, e);\n                        emit_loading_failed(&error_msg);\n                        anyhow::anyhow!(error_msg)\n                    })?;\n                LoadedEngine::SenseVoice(engine)\n            }\n            EngineType::GigaAM => {\n                let engine = GigaAMModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                    let error_msg = format!(\"Failed to load gigaam model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::GigaAM(engine)\n            }\n            EngineType::Canary => {\n                let engine = CanaryModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                    let error_msg = format!(\"Failed to load canary model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::Canary(engine)","sourceCodeStart":662,"sourceCodeEnd":698,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L662-L698","documentation":"Thrown when SenseVoiceModel::load fails to load the SenseVoice ONNX model with Int8 quantization from model_path. The underlying error is chained and a \"loading_failed\" model-state event is emitted to the frontend before returning the anyhow error.","triggerScenarios":"load_model reaches EngineType::SenseVoice and SenseVoiceModel::load(&model_path, &Quantization::Int8) errors: missing or truncated Int8 quantized ONNX files, directory layout mismatch, or ONNX Runtime session/provider failure.","commonSituations":"Download interrupted mid-file; only a non-Int8 variant present on disk; transcribe-rs update renamed expected files; quantized opset unsupported by the bundled onnxruntime version.","solutions":["Re-download the SenseVoice model","Verify the Int8 quantized files exist and match expected sizes before loading","Inspect the chained ONNX error; if quantization ops fail, update the app / transcribe-rs so the onnxruntime version matches the model","Switch to another engine's model to confirm the issue is model-file-specific"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match manager.load_model(&model_id, None) {\n    Err(e) if e.to_string().contains(\"SenseVoice\") => { /* re-download model, retry once */ }\n    other => other,\n}","preventionTips":["Verify disk space before large model downloads","Keep app and transcribe-rs versions in sync (bundled onnxruntime must match model opsets)","React to loading_failed events in the UI instead of letting users record against a failed model"],"tags":["rust","onnx","sensevoice","model-loading","transcribe-rs"],"backgroundTag":"onnx-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"}