{"record":{"id":"b4c14bbb097145ce","repo":"cjpais/Handy","slug":"sensevoice-transcription-failed","errorCode":null,"errorMessage":"SenseVoice transcription failed: {}","messagePattern":"SenseVoice transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1392,"sourceCode":"                        }),\n                    LoadedEngine::SenseVoice(sense_voice_engine) => {\n                        let language = match normalize_cjk_language(&validated_language) {\n                            \"zh\" => Some(\"zh\".to_string()),\n                            \"en\" => Some(\"en\".to_string()),\n                            \"ja\" => Some(\"ja\".to_string()),\n                            \"ko\" => Some(\"ko\".to_string()),\n                            \"yue\" => Some(\"yue\".to_string()),\n                            _ => None,\n                        };\n                        applied_language_hint = language.clone();\n                        let params = SenseVoiceParams {\n                            language,\n                            use_itn: Some(true),\n                        };\n                        sense_voice_engine\n                            .transcribe_with(&audio, &params)\n                            .map(|r| r.text)\n                            .map_err(|e| anyhow::anyhow!(\"SenseVoice transcription failed: {}\", e))\n                    }\n                    LoadedEngine::GigaAM(gigaam_engine) => gigaam_engine\n                        .transcribe(&audio, &TranscribeOptions::default())\n                        .map(|r| r.text)\n                        .map_err(|e| anyhow::anyhow!(\"GigaAM transcription failed: {}\", e)),\n                    LoadedEngine::Canary(canary_engine) => {\n                        output_was_translated = settings.translate_to_english;\n                        let lang = if validated_language == \"auto\" {\n                            None\n                        } else {\n                            Some(validated_language.clone())\n                        };\n                        applied_language_hint = lang.clone();\n                        let options = TranscribeOptions {\n                            language: lang,\n                            translate: settings.translate_to_english,\n                            ..Default::default()\n                        };","sourceCodeStart":1374,"sourceCodeEnd":1410,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L1374-L1410","documentation":"The SenseVoice branch builds SenseVoiceParams { language (zh/en/ja/ko/yue or None), use_itn: true } and calls transcribe_with; this error wraps the ONNX Runtime inference failure with the library error chained.","triggerScenarios":"sense_voice_engine.transcribe_with errors: execution provider failure, degenerate/short audio, or graph/tensor errors from the Int8 model; the language hint itself is sanitized to a supported set or None before the call, so failures come from inference, not the hint value.","commonSituations":"GPU provider flakiness after driver updates; recordings trimmed to near-zero by VAD; corrupted Int8 model files.","solutions":["Inspect the chained ORT error; switch accelerator to CPU when a provider error is shown","Retry with a longer recording","Re-download the SenseVoice model if the graph errors","Update the app for onnxruntime/transcribe-rs compatibility fixes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = manager.transcribe(audio) {\n    if e.to_string().contains(\"SenseVoice transcription failed\") && e.to_string().contains(\"provider\") {\n        settings.ort_accelerator = OrtAcceleratorSetting::Cpu; // remediate and retry\n        return manager.transcribe(audio);\n    }\n    return Err(e);\n}","preventionTips":["Keep GPU drivers updated; use CPU accelerator when provider errors recur","Verify the language setting is one of zh/en/ja/ko/yue or auto for SenseVoice","Re-download the Int8 model on deterministic graph errors"],"tags":["rust","onnx","sensevoice","inference"],"backgroundTag":"model-inference-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"}