{"record":{"id":"ac8ed26e2a82d693","repo":"cjpais/Handy","slug":"gigaam-transcription-failed","errorCode":null,"errorMessage":"GigaAM transcription failed: {}","messagePattern":"GigaAM transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1371,"sourceCode":"                            \"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                        };\n                        canary_engine\n                            .transcribe(&audio, &options)\n                            .map(|r| r.text)\n                            .map_err(|e| anyhow::anyhow!(\"Canary transcription failed: {}\", e))\n                    }","sourceCodeStart":1353,"sourceCodeEnd":1389,"githubUrl":"https://github.com/cjpais/Handy/blob/98a4d80cce8ad41efec2a419b59d9e81229a35d7/src-tauri/src/managers/transcription.rs#L1353-L1389","documentation":"GigaAMModel::transcribe failed during ONNX inference with default TranscribeOptions. The wrapped error is from transcribe-rs/ONNX Runtime: session run failure, execution-provider fault, degenerate input length after VAD, or damaged Int8 artifacts. This is a per-call failure — the engine is returned to the slot and stays loaded.","triggerScenarios":"gigaam_engine.transcribe(&audio, &TranscribeOptions::default()) errors: ORT run failure on CPU or GPU provider, audio too short/empty post-VAD, corrupted model files, OOM during inference.","commonSituations":"Short utterances cut to milliseconds by VAD; partial downloads or quarantined .onnx files; provider version drift after an app update; low-resource machines running large concurrent workloads.","solutions":["Retry the recording — transient faults often clear immediately","Record longer audio so the post-VAD buffer is non-degenerate","Re-download the GigaAM model if every attempt fails","Reduce memory/GPU pressure before transcribing","Update Handy so ort and model artifacts stay matched"],"exampleFix":"// before\nlet r = gigaam_engine.transcribe(&audio, &TranscribeOptions::default())?;\n\n// after — guard input length and retry once on ORT failure\nanyhow::ensure!(audio.len() >= MIN_INPUT_SAMPLES, \"audio too short for GigaAM\");\nlet r = gigaam_engine.transcribe(&audio, &TranscribeOptions::default())\n    .or_else(|_| gigaam_engine.transcribe(&audio, &TranscribeOptions::default()))?;","handlingStrategy":"try-catch","validationCode":"anyhow::ensure!(audio.len() >= 1600, \"audio too short for GigaAM\");\nanyhow::ensure!(audio.iter().all(|s| s.is_finite()), \"non-finite audio\");","typeGuard":null,"tryCatchPattern":"match tm.transcribe(audio.clone()) {\n    Err(e) if e.to_string().contains(\"GigaAM transcription failed\") => tm.transcribe(audio), // single retry\n    other => other,\n}","preventionTips":["Avoid sub-second clips after VAD trimming","Keep the models directory intact and excluded from cleaners","Close memory-hungry apps before inference","Re-download the model when failures become consistent"],"tags":["rust","onnx","gigaam","inference","transcribe-rs"],"backgroundTag":"onnx-inference-failed","analyzedSha":"98a4d80cce8ad41efec2a419b59d9e81229a35d7","analyzedAt":"2026-08-16T20:58:09.966Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}