{"record":{"id":"5968f7016b5d7e28","repo":"tonhowtf/omniget","slug":"omnidisc-noise-suppression-failed","errorCode":null,"errorMessage":"[omnidisc] noise suppression failed","messagePattern":"\\[omnidisc\\] noise suppression failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/lib/stores/omnidisc-voice-store.svelte.ts","lineNumber":667,"sourceCode":"  const key = kind === \"input\" ? \"input_device\" : \"output_device\";\n  try {\n    await invoke(\"omnidisc_voice_set_device\", { kind, id });\n  } catch (e) {\n    return errorText(e);\n  }\n  try {\n    await updateSettings({ omnidisc: { voice: { [key]: id } } });\n  } catch (e) {\n    console.warn(\"[omnidisc] device preference not saved\", errorText(e));\n  }\n  return null;\n}\n\nexport async function setNoiseSuppression(enabled: boolean): Promise<void> {\n  try {\n    await invoke(\"omnidisc_voice_set_noise_suppression\", { enabled });\n  } catch (e) {\n    console.warn(\"[omnidisc] noise suppression failed\", errorText(e));\n  }\n  await updateSettings({ omnidisc: { voice: { noise_suppression: enabled } } });\n}\n\nexport async function setPttKey(key: string): Promise<void> {\n  await updateSettings({ omnidisc: { voice: { ptt_key: key } } });\n  await refreshPttStatus();\n  try {\n    await invoke(\"omnidisc_voice_ptt\", { pressed: false });\n  } catch {\n    return;\n  }\n}\n\n/**\n * `null` while unknown or while no key is set; `false` when the OS refused to\n * hand the combination over — Windows gives it to whoever asked first, macOS\n * wants Accessibility permission. Both used to fail silently, so the key just","sourceCodeStart":649,"sourceCodeEnd":685,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src/lib/stores/omnidisc-voice-store.svelte.ts#L649-L685","documentation":"Logged by setNoiseSuppression() when the `omnidisc_voice_set_noise_suppression` IPC command rejects. Note the settings write still runs afterwards, so the persisted preference may disagree with actual backend state. Non-fatal.","triggerScenarios":"Calling setNoiseSuppression(enabled) when the backend command fails: noise suppression backend (e.g. RNNoise/native filter) unavailable, voice session not started, or handler error.","commonSituations":"Toggling noise suppression before joining a channel or without an audio pipeline; missing native suppression library on the platform; command not registered; browser dev mode.","solutions":["Read errorText(e) for the backend cause (e.g. filter init failure).","Start/initialize the voice session before toggling suppression.","Verify the noise-suppression native dependency is present on the target platform.","Reconcile state: on failure, don't persist `enabled` to settings, or read back real status.","Confirm `omnidisc_voice_set_noise_suppression` is registered and returns Result."],"exampleFix":"// before\ntry {\n  await invoke(\"omnidisc_voice_set_noise_suppression\", { enabled });\n} catch (e) {\n  console.warn(\"[omnidisc] noise suppression failed\", errorText(e));\n}\nawait updateSettings({ omnidisc: { voice: { noise_suppression: enabled } } });\n// after\ntry {\n  await invoke(\"omnidisc_voice_set_noise_suppression\", { enabled });\n  await updateSettings({ omnidisc: { voice: { noise_suppression: enabled } } });\n} catch (e) {\n  console.warn(\"[omnidisc] noise suppression failed\", errorText(e));\n}","handlingStrategy":"try-catch","validationCode":"if (!isTauri()) return;\nif (!get(voiceInitialized)) await initVoice();","typeGuard":"function isTauri(): boolean {\n  return typeof window !== \"undefined\" && \"__TAURI_INTERNALS__\" in window;\n}","tryCatchPattern":"try {\n  await invoke(\"omnidisc_voice_set_noise_suppression\", { enabled });\n  await updateSettings({ omnidisc: { voice: { noise_suppression: enabled } } });\n} catch (e) {\n  console.warn(\"[omnidisc] noise suppression failed\", errorText(e));\n}","preventionTips":["Persist settings only after the backend call succeeds.","Initialize the voice pipeline before toggling DSP features.","Verify platform-specific suppression dependencies ship with the app.","Read back backend status to reconcile UI state."],"tags":["tauri","ipc","audio","settings"],"backgroundTag":"api-request-failed","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"}