{"record":{"id":"731de7f21836a32e","repo":"cjpais/Handy","slug":"moonshine-streaming-transcription-failed","errorCode":null,"errorMessage":"Moonshine streaming transcription failed: {}","messagePattern":"Moonshine streaming transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1373,"sourceCode":"                    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,\n                            use_itn: Some(true),\n                        };\n                        sense_voice_engine\n                            .transcribe_with(&audio, &params)\n                            .map(|r| r.text)","sourceCodeStart":1355,"sourceCodeEnd":1391,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L1355-L1391","documentation":"The MoonshineStreaming branch runs the streaming engine in batch mode via streaming_engine.transcribe(&audio, &TranscribeOptions::default()); this error wraps an ONNX Runtime failure specific to the streaming-variant graph, chained after the colon.","triggerScenarios":"Batch transcription is attempted on the streaming-variant engine (e.g. fallback after a stream was never active) and ORT inference fails: provider error, shape mismatch because streaming graphs expect chunked input, or corrupt model files.","commonSituations":"Fallback-to-batch path exercising the streaming model with unusual audio lengths; GPU provider issues; partially downloaded streaming model.","solutions":["Check the chained ORT message; switch accelerator to CPU if a provider error appears","Re-download the streaming model if graph errors persist","Prefer the non-streaming Moonshine model for batch workloads","Retry — transient provider failures often clear on a fresh session"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match manager.transcribe(audio.clone()) {\n    Err(e) if e.to_string().contains(\"Moonshine streaming transcription failed\") => {\n        // streaming graph in batch mode can be finicky: retry once, then suggest the non-streaming model\n        manager.transcribe(audio)\n    }\n    other => other,\n}","preventionTips":["Prefer the non-streaming Moonshine model for batch workloads","Keep the streaming model's files intact (re-download on graph errors)","Switch accelerator to CPU to rule out provider issues"],"tags":["rust","onnx","moonshine","streaming","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"}