tonhowtf/omniget · error
o pacote baixado nao contem o whisper-cli
Error message
o pacote baixado nao contem o whisper-cli
What it means
After unpacking the release archive into a staging dir, install() searches for the whisper-cli executable (bin_name accounts for .exe on Windows). If it is not present, the staging dir is removed and this error is returned. It guards against upstream release layout changes or a corrupted/partial extraction.
Solutions
- Re-run the install to rule out a corrupted download.
- Check the latest whisper.cpp release layout; if the binary was renamed, update bin_name()/find_file matching.
- Verify the correct asset was downloaded (asset.name logged as "[whisper] baixando ...").
- As a workaround, install whisper-cpp from the system (brew/apt) and point Configuracoes at it.
Defensive patterns
Strategy: retry
Try / catch
match whisper::install(variant, &progress).await {
Err(e) if e.to_string().contains("nao contem o whisper-cli") => {
// retry once; if it persists, check the upstream release layout
}
other => other?,
} Prevention
- Retry installs once before reporting failure.
- Track whisper.cpp release notes for renamed binaries/archives.
- Use a pinned release/tag if layout churn is a problem.
When it happens
Trigger: github::find_file(&staging, bin_name("whisper-cli")) returns None because the archive extracted successfully but contains no file named whisper-cli(.exe) — e.g. upstream renamed the binary or restructured the archive.
Common situations: whisper.cpp released a new package layout; a proxy/mirror served a wrong or partial asset that still unpacked; an unexpected asset matched the name filter.
Related errors
- o whisper.cpp nao publica binario para este sistema…
- whisper-cli sumiu depois de mover a pasta
- Failed to move into place
- Could not determine data directory
- Spawn blocking failed
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/eb173f4a588c62fa.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/whisper.rs:224
}
pub async fn install(variant: &str, progress: ProgressFn) -> anyhow::Result<PathBuf> {
let name = asset_name(variant)?;
let dir = managed_dir().ok_or_else(|| anyhow!("Could not determine data directory"))?;
let client = github::client()?;
let asset = github::asset(&client, REPO, None, |n| n == name).await?;
tracing::info!("[whisper] baixando {} ({})", asset.name, asset.tag);
let data = github::download(&client, &asset, false, &progress, "whisper-cli").await?;
let staging = dir.with_extension("new");
let _ = std::fs::remove_dir_all(&staging);
let staging_c = staging.clone();
let asset_name_c = asset.name.clone();
tokio::task::spawn_blocking(move || github::unpack(&data, &asset_name_c, &staging_c))
.await
.map_err(|e| anyhow!("Spawn blocking failed: {}", e))??;
let Some(exe) = github::find_file(&staging, &bin_name("whisper-cli")) else {
let _ = std::fs::remove_dir_all(&staging);
return Err(anyhow!("o pacote baixado nao contem o whisper-cli"));
};
github::make_executable(&exe);
// As libs (.dll/.so) ficam ao lado do executável no mesmo pacote.
github::swap_dir(&staging, &dir)?;
github::strip_quarantine(&dir).await;
let final_exe = github::find_file(&dir, &bin_name("whisper-cli"))
.ok_or_else(|| anyhow!("whisper-cli sumiu depois de mover a pasta"))?;
std::fs::write(dir.join("VERSION"), &asset.tag).ok();
Ok(final_exe)
}
#[derive(Debug, Clone, Deserialize)]
pub struct TranscribeOptions {
pub input: String,
pub model: String,
/// "auto" ou código ISO ("pt", "en").
pub language: String,
/// Traduzir a saída para inglês (recurso nativo do Whisper).View on GitHub (pinned to 8600b91f42)