Files
home-manager-dotfiles/rnnnoise.nix
T
2026-09-02 14:03:18 -04:00

50 lines
1.4 KiB
Nix

{ pkgs, ... }:
let
inherit (pkgs) rnnoise-plugin;
in
{
xdg.configFile."pipewire/pipewire.conf.d/99-rnnoise.conf" = {
text = builtins.toJSON {
"context.modules" = [
{
name = "libpipewire-module-filter-chain";
args = {
"node.description" = "Noise Canceling source";
"media.name" = "Noise Canceling source";
"filter.graph" = {
nodes = [
{
type = "ladspa";
name = "rnnoise";
plugin = "${rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
label = "noise_suppressor_mono";
control = {
"VAD Threshold (%)" = 80.0;
"VAD Grace Period (ms)" = 200;
"Retroactive VAD Grace (ms)" = 0;
};
}
];
};
"audio.position" = [ "FL" "FR" ];
"capture.props" = {
"node.name" = "effect_input.rnnoise";
"node.passive" = true;
"target.object" = "alsa_input.usb-audio-technica____AT2020_USB-00.analog-stereo";
"audio.rate" = 48000;
};
"playback.props" = {
"node.name" = "effect_output.rnnoise";
"media.class" = "Audio/Source";
"audio.rate" = 48000;
};
};
}
];
};
};
}