From f5bb572e56fcc043263118dc32fafb1f04938de3 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Sat, 28 Jun 2025 01:34:36 +0200 Subject: [PATCH] fix: add all the options --- modules/software/audio_video/noise_cancel.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/software/audio_video/noise_cancel.nix b/modules/software/audio_video/noise_cancel.nix index d0bbd2b..b8d1abf 100644 --- a/modules/software/audio_video/noise_cancel.nix +++ b/modules/software/audio_video/noise_cancel.nix @@ -15,7 +15,12 @@ # mono can be replaced with stereo for double the performance as cost "label" = "noise_suppressor_mono"; "control" = { + # if probability of sound being a voice is lower than this threshold - it will be silenced. In most cases the threshold between 85% - 95% would be fine. Without the VAD some loud noises may still be a bit audible when there is no voice. "VAD Threshold (%)" = 75.0; + # for how long after the last voice detection the output won't be silenced. This helps when ends of words/sentences are being cut off. + "VAD Grace Period (ms)" = 200; + # similar to VAD Grace Period (ms) but for starts of words/sentences. This introduces latency! + "Retroactive VAD Grace Period (ms)" = 0; }; } ]; @@ -27,10 +32,12 @@ "capture.props" = { "node.name" = "effect_input.rnnoise"; "node.passive" = true; + "audio.rate" = 48000; }; "playback.props" = { "node.name" = "effect_output.rnnoise"; "media.class" = "Audio/Source"; + "audio.rate" = 48000; }; }; }