cjpais/Handy · error · anyhow::Error
Failed to load parakeet model
Error message
Failed to load parakeet model {}: {} What it means
Raised when ParakeetModel::load(path, Quantization::Int8) fails to load an ONNX-based Parakeet model via transcribe-rs. Failures come from the ONNX runtime layer: unreadable/corrupt .onnx files, missing companion files for the model directory, unsupported opset, or execution-provider init failure. A 'loading_failed' event is emitted with the same message before the error is returned.
Solutions
- Re-download the Parakeet model from the catalog (downloads are hash-verified, guaranteeing intact files).
- Restart the app after changing accelerator settings so a fresh ONNX session/provider is initialized.
- Try CPU acceleration to rule out a missing execution provider.
- If it persists after a clean re-download, the model's opset may exceed the bundled runtime — report the model id and app version.
Defensive patterns
Strategy: fallback
Validate before calling
// Verify all expected ONNX files exist before loading
for f in ["model.onnx", "vocab.json"] {
if !model_path.join(f).exists() {
anyhow::bail!("parakeet model incomplete: missing {} in {}", f, model_path.display());
}
} Try / catch
match ParakeetModel::load(&model_path, &Quantization::Int8) {
Ok(m) => Ok(m),
Err(e) => {
warn!("parakeet Int8 failed ({e}); retrying default quantization on CPU");
set_accelerator_cpu();
ParakeetModel::load(&model_path, &Quantization::default())
}
} Prevention
- Load ONNX models only from hash-verified catalog downloads.
- Restart the app after changing accelerator settings so providers re-initialize cleanly.
- Pin onnxruntime-compatible model versions in the catalog; reject opsets newer than the bundled runtime.
- On provider-less machines, default Parakeet to CPU to avoid provider init failures.
When it happens
Trigger: Selecting a Parakeet model whose ONNX files are corrupt or incompletely downloaded; opset/operators unsupported by the bundled onnxruntime; provider (e.g. CUDA/CoreML) unavailable on the machine; quantized graph incompatible with the runtime build.
Common situations: Interrupted model downloads leaving truncated .onnx files; onnxruntime version drift after dependency updates; machines without the expected acceleration providers; models added by hand into the models directory without all required files.
Related errors
- Failed to create SileroVad
- Failed to load canary model
- Failed to load cohere model
- Failed to load gigaam model
- Failed to load moonshine model
AI-assisted analysis of cjpais/Handy@ba10ce1943 (2026-08-17).
Data as JSON: /api/errors/ddb87f221dadc76e.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/managers/transcription.rs:645
supports_translate={}, supports_language_detect={})",
model_id,
backend,
requested_device,
bound_backend,
bound_device,
caps.supports_streaming,
caps.supports_translate,
caps.supports_language_detect
);
LoadedEngine::TranscribeCpp(session)
}
EngineType::Parakeet => {
let engine =
ParakeetModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg =
format!("Failed to load parakeet model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::Parakeet(engine)
}
EngineType::Moonshine => {
let engine = MoonshineModel::load(
&model_path,
MoonshineVariant::Base,
&Quantization::default(),
)
.map_err(|e| {
let error_msg = format!("Failed to load moonshine model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::Moonshine(engine)
}
EngineType::MoonshineStreaming => {
let engine = StreamingModel::load(&model_path, 0, &Quantization::default())View on GitHub (pinned to ba10ce1943)