cjpais/Handy · error · anyhow::Error

Failed to load parakeet model {}: {}

Error message

Failed to load parakeet model {}: {}

What it means

The Parakeet engine path: transcribe-rs ParakeetModel::load on the model directory with Int8 quantization failed. Parakeet is a directory-based ONNX model, so failures usually mean incomplete directory contents (missing .onnx or config files), a corrupted payload, or an ONNX runtime/provider problem on this machine. The embedded inner error carries the underlying cause.

Source

Thrown at src-tauri/src/managers/transcription.rs:619

                    "Loaded whisper model '{}' (requested {:?}, gpu_device {}, bound backend '{}', \
                     supports_streaming={}, supports_translate={}, supports_language_detect={})",
                    model_id,
                    backend,
                    gpu_device,
                    bound_backend,
                    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 98a4d80cce)

Solutions

  1. Re-download the model: delete_model(model_id) + download_model(model_id) to obtain a verified complete directory
  2. Verify the directory contains all expected files and that no <filename>.partial marker remains, then retry
  3. Update Handy — the ONNX runtime is bundled, and updates fix provider issues
  4. Collect the embedded inner error from logs and report it if a re-download does not help
Defensive patterns

Strategy: retry

Validate before calling

// Directory-based ONNX model: check the expected files exist before loading
fn parakeet_dir_complete(mm: &ModelManager, filename: &str) -> bool {
    let dir = mm.models_dir.join(filename);
    let partial = mm.models_dir.join(format!("{}.partial", filename));
    dir.is_dir()
        && !partial.exists()
        && dir.join("model.onnx").is_file() // adjust to the expected file set
}

Try / catch

match transcription_manager.load_model(model_id.clone()).await {
    Ok(()) => Ok(()),
    Err(e) if e.to_string().starts_with("Failed to load parakeet model") => {
        // directory contents are suspect: re-download verified bytes, retry once
        model_manager.delete_model(&model_id)?;
        model_manager.download_model(&model_id).await?;
        transcription_manager.load_model(model_id.clone()).await
    }
    Err(e) => Err(e),
}

Prevention

When it happens

Trigger: The directory model is incomplete — download interrupted after directory creation but before all files were written and verified; the ONNX runtime libraries are missing or incompatible on the platform; a corrupted .onnx payload; the files present do not match the Int8 quantization path.

Common situations: Manual copies of the parakeet directory missing tokenizer/config files; interrupted first download leaving a partial directory; unusual Linux distributions lacking expected ONNX runtime dependencies.

Related errors


AI-assisted analysis of cjpais/Handy@98a4d80cce (2026-08-16). Data as JSON: /api/errors/ddb87f221dadc76e. Report an issue: GitHub.