{"record":{"id":"ab6bcbb50e426cce","repo":"cjpais/Handy","slug":"parakeet-transcription-failed","errorCode":null,"errorMessage":"Parakeet transcription failed: {}","messagePattern":"Parakeet transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1363,"sourceCode":"                            .map(|t| {\n                                // Whisper's audio-based LID (auto mode only;\n                                // `None` when a language hint was passed).\n                                model_detected_language = t.language;\n                                t.text\n                            })\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()),","sourceCodeStart":1345,"sourceCodeEnd":1381,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L1345-L1381","documentation":"The Parakeet branch calls parakeet_engine.transcribe_with(&audio, &params) with segment-level timestamp granularity; this error wraps the ONNX Runtime inference failure. The chained message after the colon is ORT's own error (provider failure, invalid tensor shape, session/graph error).","triggerScenarios":"ONNX inference fails: audio too short/degenerate for the feature extractor, execution provider error (CUDA/CoreML/DirectML init or runtime failure), or corrupted model graph loaded earlier.","commonSituations":"Very short recordings (a fraction of a second) after VAD trimming; GPU provider issues on driver update; mixing model files between versions of the app.","solutions":["Check the chained ORT message for provider errors and switch accelerator to CPU if GPU is implicated","Retry with a slightly longer recording to rule out too-short audio","Reload/re-download the Parakeet model if the graph itself errors","Update the app if the ONNX Runtime version changed model compatibility"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = manager.transcribe(audio.clone()) {\n    if e.to_string().contains(\"Parakeet transcription failed\") {\n        // transient ORT/provider failures often clear: reload model and retry once\n        manager.unload_current_model();\n        manager.load_model_blocking(&model_id, None)?;\n        return manager.transcribe(audio);\n    }\n    return Err(e);\n}","preventionTips":["Keep GPU drivers current; fall back to CPU accelerator when provider errors recur","Discard recordings shorter than ~0.5s after VAD trim","Re-download the model when graph errors (not provider errors) appear"],"tags":["rust","onnx","parakeet","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"}