cjpais/Handy · error · anyhow::Error
Failed to load moonshine streaming model
Error message
Failed to load moonshine streaming model {}: {} What it means
Thrown when StreamingModel::load from transcribe-rs fails to load the streaming Moonshine ONNX model at model_path (variant index 0, default quantization). The ONNX Runtime error is chained after the model_id and a "loading_failed" model-state event is emitted before the anyhow error is returned.
Solutions
- Re-download the Moonshine streaming model from the model selector
- Confirm the model directory actually contains the streaming-variant ONNX files and they are non-empty
- Check the chained ONNX Runtime message for provider errors; try CPU accelerator
- Fall back to the non-streaming Moonshine model while the streaming files are repaired
Defensive patterns
Strategy: try-catch
Validate before calling
if !model_path.join("model.onnx").exists() {
// streaming variant files missing: trigger re-download before load
model_manager.ensure_downloaded(&model_id).await?;
} Try / catch
if let Err(e) = manager.load_model(&model_id, None) {
if e.to_string().contains("moonshine streaming") {
// re-download then retry once; surface persistent failures to the user
}
} Prevention
- Treat streaming model files as opaque — only delete via the model selector UI
- Avoid switching Moonshine variants while a download is in progress
- Watch for loading_failed events and re-download promptly instead of retrying loads on corrupt files
When it happens
Trigger: load_model hits EngineType::MoonshineStreaming and StreamingModel::load(&model_path, 0, &Quantization::default()) errors: streaming-variant files absent or corrupt under model_path, a base-variant directory used where the streaming layout is expected, or ONNX Runtime session creation fails.
Common situations: Corrupted/partial download of the streaming model; switching between Moonshine and Moonshine Streaming while files were half-written; version change in transcribe-rs expecting different streaming file names; missing onnxruntime provider libraries on Linux.
Related errors
- Failed to load moonshine model
- Failed to load canary model
- Failed to load cohere model
- Failed to load gigaam model
- Failed to load SenseVoice model
AI-assisted analysis of cjpais/Handy@ba10ce1943 (2026-08-17).
Data as JSON: /api/errors/04096e15bd23b1de.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/managers/transcription.rs:670
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())
.map_err(|e| {
let error_msg = format!(
"Failed to load moonshine streaming model {}: {}",
model_id, e
);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::MoonshineStreaming(engine)
}
EngineType::SenseVoice => {
let engine =
SenseVoiceModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg =
format!("Failed to load SenseVoice model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)
})?;
LoadedEngine::SenseVoice(engine)
}
EngineType::GigaAM => {
let engine = GigaAMModel::load(&model_path, &Quantization::Int8).map_err(|e| {
let error_msg = format!("Failed to load gigaam model {}: {}", model_id, e);
emit_loading_failed(&error_msg);
anyhow::anyhow!(error_msg)View on GitHub (pinned to ba10ce1943)