use pure text for rnnoise

This commit is contained in:
jopejoe1 2023-08-10 00:20:55 +02:00
parent 56626531ae
commit 03637a8689

View file

@ -17,41 +17,42 @@
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
environment.etc = let environment.etc = {
json = pkgs.formats.json {}; "pipewire/pipewire.conf.d/rnnoise.conf".text = ''
in { context.modules = [
"pipewire/pipewire.conf.d/91-rnnoise.conf".source = json.generate "91-rnnoise.conf" { { name = libpipewire-module-filter-chain
context.modules = [{
name = "libpipewire-module-filter-chain";
args = { args = {
node.description = "Noise Canceling source"; node.description = "Noise Canceling source"
media.name = "Noise Canceling source"; media.name = "Noise Canceling source"
filter.graph = { filter.graph = {
nodes = [{ nodes = [
type = "ladspa"; {
name = "rnnoise"; type = ladspa
plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; name = rnnoise
label = "noise_suppressor_mono"; plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = { control = {
"VAD Threshold (%)" = 50.0; "VAD Threshold (%)" = 50.0
"VAD Grace Period (ms)" = 200; "VAD Grace Period (ms)" = 200
"Retroactive VAD Grace (ms)" = 0; "Retroactive VAD Grace (ms)" = 0
}; }
}]; }
}; ]
}
capture.props = { capture.props = {
node.name = "capture.rnnoise_source"; node.name = "capture.rnnoise_source"
node.passive = true; node.passive = true
audio.rate = 48000; audio.rate = 48000
}; }
playback.props = { playback.props = {
node.name = "rnnoise_source"; node.name = "rnnoise_source"
media.class = "Audio/Source"; media.class = Audio/Source
audio.rate = 48000; audio.rate = 48000
}; }
}; }
}]; }
}; ]
'';
}; };
} }