{"record":{"id":"bf05cfe29d082972","repo":"cjpais/Handy","slug":"moonshine-transcription-failed","errorCode":null,"errorMessage":"Moonshine transcription failed: {}","messagePattern":"Moonshine transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1368,"sourceCode":"                            })\n                            .map_err(|e| {\n                                anyhow::anyhow!(\"transcribe-cpp transcription failed: {}\", e)\n                            })\n                    }\n                    LoadedEngine::Parakeet(parakeet_engine) => {\n                        let params = ParakeetParams {\n                            timestamp_granularity: Some(TimestampGranularity::Segment),\n                            ..Default::default()\n                        };\n                        parakeet_engine\n                            .transcribe_with(&audio, &params)\n                            .map(|r| r.text)\n                            .map_err(|e| anyhow::anyhow!(\"Parakeet transcription failed: {}\", e))\n                    }\n                    LoadedEngine::Moonshine(moonshine_engine) => moonshine_engine\n                        .transcribe(&audio, &TranscribeOptions::default())\n                        .map(|r| r.text)\n                        .map_err(|e| anyhow::anyhow!(\"Moonshine transcription failed: {}\", e)),\n                    LoadedEngine::MoonshineStreaming(streaming_engine) => streaming_engine\n                        .transcribe(&audio, &TranscribeOptions::default())\n                        .map(|r| r.text)\n                        .map_err(|e| {\n                            anyhow::anyhow!(\"Moonshine streaming transcription failed: {}\", e)\n                        }),\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,","sourceCodeStart":1350,"sourceCodeEnd":1386,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L1350-L1386","documentation":"The Moonshine branch calls moonshine_engine.transcribe(&audio, &TranscribeOptions::default()); this error wraps an ONNX Runtime failure during Moonshine inference, with the library error chained after the colon.","triggerScenarios":"transcribe() runs with LoadedEngine::Moonshine and ORT inference errors: execution provider failure, invalid input shape from degenerate audio (e.g. empty after VAD trim), or a corrupted model graph.","commonSituations":"Driver/GPU instability; extremely short recordings; model file corrupted after an interrupted re-download; onnxruntime dylib mismatch after system update.","solutions":["Read the chained ORT error to classify provider vs graph failure","Switch ONNX accelerator to CPU and retry","Re-download the Moonshine model if graph loading is implicated","Test with a longer recording to rule out too-short input"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let attempt = manager.transcribe(audio.clone());\nlet text = match attempt {\n    Err(e) if e.to_string().contains(\"Moonshine transcription failed\") => {\n        manager.transcribe(audio)? // one retry; provider glitches are usually transient\n    }\n    r => r?,\n};","preventionTips":["Use the CPU accelerator to isolate GPU provider flakiness","Ensure recordings are at least a second of audio","Re-download the Moonshine model if failures are deterministic"],"tags":["rust","onnx","moonshine","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"}