cjpais/Handy · error · anyhow::Error
GigaAM transcription failed: {}
Error message
GigaAM transcription failed: {} What it means
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.
Source
Thrown at src-tauri/src/managers/transcription.rs:1371
"ja" => Some("ja".to_string()),
"ko" => Some("ko".to_string()),
"yue" => Some("yue".to_string()),
_ => None,
};
applied_language_hint = language.clone();
let params = SenseVoiceParams {
language,
use_itn: Some(true),
};
sense_voice_engine
.transcribe_with(&audio, ¶ms)
.map(|r| r.text)
.map_err(|e| anyhow::anyhow!("SenseVoice transcription failed: {}", e))
}
LoadedEngine::GigaAM(gigaam_engine) => gigaam_engine
.transcribe(&audio, &TranscribeOptions::default())
.map(|r| r.text)
.map_err(|e| anyhow::anyhow!("GigaAM transcription failed: {}", e)),
LoadedEngine::Canary(canary_engine) => {
output_was_translated = settings.translate_to_english;
let lang = if validated_language == "auto" {
None
} else {
Some(validated_language.clone())
};
applied_language_hint = lang.clone();
let options = TranscribeOptions {
language: lang,
translate: settings.translate_to_english,
..Default::default()
};
canary_engine
.transcribe(&audio, &options)
.map(|r| r.text)
.map_err(|e| anyhow::anyhow!("Canary transcription failed: {}", e))
}View on GitHub (pinned to 98a4d80cce)
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
Example fix
// before
let r = gigaam_engine.transcribe(&audio, &TranscribeOptions::default())?;
// after — guard input length and retry once on ORT failure
anyhow::ensure!(audio.len() >= MIN_INPUT_SAMPLES, "audio too short for GigaAM");
let r = gigaam_engine.transcribe(&audio, &TranscribeOptions::default())
.or_else(|_| gigaam_engine.transcribe(&audio, &TranscribeOptions::default()))?; Defensive patterns
Strategy: try-catch
Validate before calling
anyhow::ensure!(audio.len() >= 1600, "audio too short for GigaAM"); anyhow::ensure!(audio.iter().all(|s| s.is_finite()), "non-finite audio");
Try / catch
match tm.transcribe(audio.clone()) {
Err(e) if e.to_string().contains("GigaAM transcription failed") => tm.transcribe(audio), // single retry
other => other,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to load gigaam model {}: {}
- Parakeet transcription failed: {}
- Moonshine transcription failed: {}
- Moonshine streaming transcription failed: {}
- SenseVoice transcription failed: {}
AI-assisted analysis of cjpais/Handy@98a4d80cce (2026-08-16).
Data as JSON: /api/errors/ac8ed26e2a82d693.
Report an issue: GitHub.