{"record":{"id":"27468ae9ed9c7f99","repo":"tonhowtf/omniget","slug":"lista-de-vozes-do-edge-indisponivel-http","errorCode":null,"errorMessage":"lista de vozes do Edge indisponivel: HTTP {}","messagePattern":"lista de vozes do Edge indisponivel: HTTP (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/edge_tts.rs","lineNumber":92,"sourceCode":"        CHROMIUM_FULL_VERSION\n    );\n    let client = super::client()?;\n    let resp = client\n        .get(&url)\n        .header(\"Authority\", \"speech.platform.bing.com\")\n        .header(\n            \"Sec-CH-UA\",\n            format!(\n                \"\\\" Not;A Brand\\\";v=\\\"99\\\", \\\"Microsoft Edge\\\";v=\\\"{0}\\\", \\\"Chromium\\\";v=\\\"{0}\\\"\",\n                chromium_major()\n            ),\n        )\n        .header(\"Sec-CH-UA-Mobile\", \"?0\")\n        .header(\"Accept\", \"*/*\")\n        .send()\n        .await?;\n    if !resp.status().is_success() {\n        return Err(anyhow!(\n            \"lista de vozes do Edge indisponivel: HTTP {}\",\n            resp.status()\n        ));\n    }\n    let mut voices: Vec<Voice> = resp.json().await?;\n    voices.sort_by(|a, b| {\n        a.locale\n            .cmp(&b.locale)\n            .then(a.short_name.cmp(&b.short_name))\n    });\n    if let Ok(mut g) = VOICES.lock() {\n        *g = Some((std::time::Instant::now(), voices.clone()));\n    }\n    Ok(voices)\n}\n\n#[derive(Debug, Clone, Serialize)]\npub struct WordBoundary {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/edge_tts.rs#L74-L110","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Retry after a short delay — transient 429/5xx responses are common","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","Bypass any corporate proxy or configure reqwest's proxy settings correctly","Update the library to a version whose endpoint/token logic matches the current Microsoft service"],"exampleFix":"// before\nlet voices = edge_tts::list_voices().await?;\n// after\nlet voices = match edge_tts::list_voices().await {\n    Ok(v) => v,\n    Err(e) => { log::warn!(\"voice list unavailable, using cached list: {e}\"); cached_voices().unwrap_or_default() }\n};","handlingStrategy":"fallback","validationCode":"// no pre-call validation possible for remote status; keep a cached voice list\nlet has_cache = std::path::Path::new(\"voices_cache.json\").exists();","typeGuard":null,"tryCatchPattern":"match edge_tts::list_voices().await {\n    Ok(v) => v,\n    Err(e) => { warn!(\"{e}\"); load_cached_voices().unwrap_or_default() }\n}","preventionTips":["Cache the voice list locally and refresh opportunistically","Add retry with exponential backoff for 429/5xx","Keep the library updated for current Edge headers/tokens"],"tags":["network","http","edge-tts","voice-list"],"backgroundTag":"http-error-response","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}