tonhowtf/omniget · error
whisper-cli falhou
Error message
whisper-cli falhou: {} What it means
whisper-cli exited with a non-zero status after transcription was attempted; the {} is the last non-progress stderr line captured while streaming 'progress =' lines to the progress reporter. Common causes are an unsupported/corrupt model file, missing audio input, or invalid CLI arguments.
Solutions
- Read the captured stderr tail to identify the exact whisper-cli failure
- Confirm the whisper model file exists, is complete, and matches the model flag used
- Re-encode the audio to 16kHz WAV, the format whisper-cli expects, and retry
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src-tauri/omniget-core/src/core/tools/whisper.rs:389 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/28b68c13446022f8.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/whisper.rs:389
if let Some(err) = stderr {
let mut lines = BufReader::new(err).lines();
while let Ok(Some(line)) = lines.next_line().await {
if let Some(rest) = line.trim().strip_prefix("progress =") {
if let Ok(pct) = rest.trim().trim_end_matches('%').trim().parse::<u64>() {
report(&p2, &id2, "transcribe", pct.min(100), Some(100), None);
}
} else if !line.trim().is_empty() {
tail = line;
}
}
}
tail
});
let status = child.wait().await?;
let tail = stderr_task.await.unwrap_or_default();
let _ = tokio::fs::remove_file(&wav).await;
if !status.success() {
return Err(anyhow!("whisper-cli falhou: {}", tail));
}
let json_path = out_prefix.with_extension("json");
let text = tokio::fs::read_to_string(&json_path).await?;
let _ = tokio::fs::remove_file(&json_path).await;
let (language, cues) = parse_whisper_json(&text)?;
let out_dir = if opts.output_dir.trim().is_empty() {
input
.parent()
.map(|p| p.to_path_buf())
.unwrap_or_else(|| PathBuf::from("."))
} else {
PathBuf::from(opts.output_dir.trim())
};
std::fs::create_dir_all(&out_dir)?;
let stem = input
.file_stem()
.map(|s| s.to_string_lossy().to_string())View on GitHub (pinned to 8600b91f42)