tonhowtf/omniget · error

lista de vozes do Edge indisponivel: HTTP

Error message

lista de vozes do Edge indisponivel: HTTP {}

What it means

list_voices fetches the Edge TTS voice catalog from Microsoft's endpoint. If the HTTP response is not a success status, the library aborts with this error embedding the status code, because it cannot enumerate available voices without a valid catalog response.

Solutions

  1. Retry after a short delay — transient 429/5xx responses are common
  2. Check that the request carries current Edge-browser headers (Sec-CH-UA, token) and that the endpoint URL matches the latest known Edge TTS endpoint
  3. Bypass any corporate proxy or configure reqwest's proxy settings correctly
  4. Update the library to a version whose endpoint/token logic matches the current Microsoft service

Example fix

// before
let voices = edge_tts::list_voices().await?;
// after
let voices = match edge_tts::list_voices().await {
    Ok(v) => v,
    Err(e) => { log::warn!("voice list unavailable, using cached list: {e}"); cached_voices().unwrap_or_default() }
};
Defensive patterns

Strategy: fallback

Validate before calling

// no pre-call validation possible for remote status; keep a cached voice list
let has_cache = std::path::Path::new("voices_cache.json").exists();

Try / catch

match edge_tts::list_voices().await {
    Ok(v) => v,
    Err(e) => { warn!("{e}"); load_cached_voices().unwrap_or_default() }
}

Prevention

When it happens

Trigger: Calling list_voices() when Microsoft's voice-list endpoint returns a non-2xx status (403, 429, 5xx), or when a proxy/firewall blocks the request so the server responds with an error page/status.

Common situations: Microsoft blocking or rate-limiting requests missing a current Sec-MS-GEC-style token; corporate proxies intercepting HTTPS; regional outages of the speech platform; the endpoint URL having changed after a Microsoft service update.

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/edge_tts.rs:92

        CHROMIUM_FULL_VERSION
    );
    let client = super::client()?;
    let resp = client
        .get(&url)
        .header("Authority", "speech.platform.bing.com")
        .header(
            "Sec-CH-UA",
            format!(
                "\" Not;A Brand\";v=\"99\", \"Microsoft Edge\";v=\"{0}\", \"Chromium\";v=\"{0}\"",
                chromium_major()
            ),
        )
        .header("Sec-CH-UA-Mobile", "?0")
        .header("Accept", "*/*")
        .send()
        .await?;
    if !resp.status().is_success() {
        return Err(anyhow!(
            "lista de vozes do Edge indisponivel: HTTP {}",
            resp.status()
        ));
    }
    let mut voices: Vec<Voice> = resp.json().await?;
    voices.sort_by(|a, b| {
        a.locale
            .cmp(&b.locale)
            .then(a.short_name.cmp(&b.short_name))
    });
    if let Ok(mut g) = VOICES.lock() {
        *g = Some((std::time::Instant::now(), voices.clone()));
    }
    Ok(voices)
}

#[derive(Debug, Clone, Serialize)]
pub struct WordBoundary {

View on GitHub (pinned to 8600b91f42)