tonhowtf/omniget · warning

nao entendi nada

Error message

nao entendi nada

What it means

stop() transcribes the recorded WAV and, after normalizing whitespace, throws 'nao entendi nada' ('didn't understand anything') if the transcription result is empty. This distinguishes a successful capture+transcription pipeline from one that produced no words.

Solutions

  1. Record again, speaking clearly and holding the recording at least a second.
  2. Check that the transcription model/language setting matches the language actually spoken.
  3. Verify microphone input level in OS settings — if capture is fine but text is always empty, the transcription backend/config is the problem.
  4. Handle the empty-text case gracefully in the UI (show 'nothing recognized' instead of a hard error).

Example fix

null
Defensive patterns

Strategy: fallback

Try / catch

let text = match dictation::stop(progress).await {
    Ok(t) if !t.is_empty() => t,
    Ok(_) | Err(e) if e.to_string().contains("nao entendi nada") => String::new(), // show 'nothing recognized'
    Err(e) => return Err(e),
};

Prevention

When it happens

Trigger: The speech-to-text engine returns empty or whitespace-only text for the recorded audio.

Common situations: User recorded only silence or noise too short/quiet to transcribe; mic gain too low; wrong language/model selected for transcription; user released the hotkey immediately (sub-400ms audio, only padding).

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/aae475bb7c930112. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/dictation.rs:318

        let t = super::whisper::transcribe(
            super::whisper::TranscribeOptions {
                input: rec.wav.to_string_lossy().to_string(),
                model: opts.model.clone(),
                language: opts.language.clone(),
                translate: false,
                max_len: 0,
                prompt: String::new(),
                output_dir: out_dir.to_string_lossy().to_string(),
                threads: 0,
            },
            progress.clone(),
        )
        .await?;
        let _ = std::fs::remove_file(&rec.wav);
        let _ = std::fs::remove_dir_all(&out_dir);
        let mut text = t.text.split_whitespace().collect::<Vec<_>>().join(" ");
        if text.is_empty() {
            return Err(anyhow!("nao entendi nada"));
        }
        if opts.trailing_space {
            text.push(' ');
        }
        Ok(text)
    }
    .await;
    set_phase("idle");
    match result {
        Ok(text) => {
            *LAST.lock().unwrap_or_else(|e| e.into_inner()) = Some((text.clone(), None));
            super::report(
                &progress,
                "dictation",
                "done",
                1,
                Some(1),
                Some(text.clone()),

View on GitHub (pinned to 8600b91f42)