You can add the capabilities manually if you copy the binary out of the store.
sudo setcap 'CAP_SYS_RESOURCE=+ep' ./whatever/filepath
Capabilities will be integrated into guix later:
https://lists.gnu.org/archive/html/guix-patches/2023-02/msg00700.html

But even then, the package doesn't work with PulseAudio due to incorrect ladspa 
plugin name.
The attached files contain the fix I use.

Because you use pipewire, it's possible NoiseTorch will work without my patch. 
I think it's still required.
But noise-supression-for-voice also easily supports pipewire without 
NoiseTorch, so you can just use that.

Attachment: noisetorch.scm
Description: Binary data

diff --git a/module.go b/module.go
index 6e69a7e..dd38275 100644
--- a/module.go
+++ b/module.go
@@ -200,7 +200,7 @@ func loadPipeWireInput(ctx *ntcontext, inp *device) error {
 	idx, err := loadModule(ctx, "module-ladspa-source",
 		fmt.Sprintf("source_name='Filtered Microphone for %s' master=%s "+
 			"rate=48000 channels=1 "+
-			"label=nt-filter plugin=%s control=%d", inp.Name, inp.ID, ctx.librnnoise, ctx.config.Threshold))
+			"label=noise_suppressor_mono plugin=%s control=%d,1000,50,0,0", inp.Name, inp.ID, ctx.librnnoise, ctx.config.Threshold))
 
 	if err != nil {
 		return err
@@ -214,7 +214,7 @@ func loadPipeWireOutput(ctx *ntcontext, out *device) error {
 	idx, err := loadModule(ctx, "module-ladspa-sink",
 		fmt.Sprintf("sink_name='Filtered Headphones' master=%s "+
 			"rate=48000 channels=1 "+
-			"label=nt-filter plugin=%s control=%d", out.ID, ctx.librnnoise, ctx.config.Threshold))
+			"label=noise_suppressor_mono plugin=%s control=%d,1000,50,0,0", out.ID, ctx.librnnoise, ctx.config.Threshold))
 
 	if err != nil {
 		return err
@@ -233,7 +233,7 @@ func loadPulseInput(ctx *ntcontext, inp *device) error {
 
 	idx, err = loadModule(ctx, "module-ladspa-sink",
 		fmt.Sprintf("sink_name=nui_mic_raw_in sink_master=nui_mic_denoised_out "+
-			"label=nt-filter plugin=%s control=%d", ctx.librnnoise, ctx.config.Threshold))
+			"label=noise_suppressor_mono plugin=%s control=%d,1000,50,0,0", ctx.librnnoise, ctx.config.Threshold))
 	if err != nil {
 		return err
 	}
@@ -276,7 +276,7 @@ func loadPulseOutput(ctx *ntcontext, out *device) error {
 	}
 
 	_, err = loadModule(ctx, "module-ladspa-sink", fmt.Sprintf(`sink_name=nui_out_ladspa sink_master=nui_out_out_sink `+
-		`label=nt-filter channels=1 plugin=%s control=%d rate=%d`,
+		`label=noise_suppressor_mono channels=1 plugin=%s control=%d,1000,50,0,0 rate=%d`,
 		ctx.librnnoise, ctx.config.Threshold, 48000))
 	if err != nil {
 		return err

Reply via email to