Real-time microphone noise suppression on freebsd

Hello,

I use NoiseTorch on linux

NoiseTorch is an easy to use open source application for Linux with PulseAudio. It creates a virtual microphone that suppresses noise, in any application. Use whichever conferencing or VOIP application you like and simply select the NoiseTorch Virtual Microphone as input to torch the sound of your mechanical keyboard, computer fans, trains and the likes.

Do you know if there is an equivalent on Freebsd?

There is rnnoise-nu which seems to be the reference for these projects

RNNoise is a noise suppression library based on a recurrent neural network. RNNoise-nu is a modified version of RNNoise aimed to be a bit more general
purpose.

1 Like

Hi @bsd276,

audio/noise-suppression-for-voice-lv2 seems to do what you want.

Hello,

Thanks, this is what Iā€™m looking forā€¦but I canā€™t find it with pkg

Iā€™m using the latest version of Nomad (1.4 rc1) everything works for me, nice work.

nomad@NomadBSD$ sudo pkg install noise-suppression-for-voice-lv2
Mot de passe :
Updating FreeBSD repository catalogueā€¦
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching ā€˜noise-suppression-for-voice-lv2ā€™ have been found in the repositories

nomad@NomadBSD$ sudo pkg search noise
libnoise-1.0.0_4 Generates three-dimensional coherent noise
linenoise-ng-1.0.0_2 Small, portable readline replacement
noise-repellent-lv2-0.1.5.3 LV2 plugin for broadband noise reduction
py37-whitenoise-4.1.2 Radically simplified static file serving for wsgi applications
rnnoise-nu-g20180916 Recurrent neural network for audio noise reduction
speech-denoiser-lv2-g20181007_1 Speech denoise LV2 plugin based on RNNoise library

nomad@NomadBSD$ uname -ar
FreeBSD NomadBSD 12.2-RELEASE-p2 FreeBSD 12.2-RELEASE-p2 r369102 NOMADBSD amd64

nomad@NomadBSD$ freebsd-version -ku
12.2-RELEASE-p2
12.2-RELEASE-p2

Do you have an idea?

You have to build it from the ports:

# portsnap fetch extract
# cd /usr/ports/audio/noise-suppression-for-voice-lv2 && make install distclean

Checking out the ports tree can take some time on a USB flash drive.

Thanks a lot I have a usb SSD disk :wink:

I think the lib doesnā€™t work or thereā€™s an error so much the worseā€¦

After

portsnap fetch extract

cd /usr/ports/audio/noise-suppression-for-voice-lv2 && make install distclean

I have
nomad@NomadBSD$ ll /usr/local/lib/lv2/rnnoise.lv2/
total 320
drwxr-xr-x 1 root wheel - 512 29 janv. 21:52 ./
drwxr-xr-x 1 root wheel - 1024 29 janv. 21:52 ā€¦/
-rwxr-xr-x 1 root wheel - 146064 29 janv. 21:52 librnnoise_lv2.so*
-rw-rā€“r-- 1 root wheel - 242 29 janv. 21:51 manifest.ttl
-rw-rā€“r-- 1 root wheel - 775 29 janv. 21:51 rnnoise.ttl

I followed the guide

Then, create the new device using:

pacmd load-module module-null-sink sink_name=mic_denoised_out rate=48000
=> command is correct
pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/usr/local/lib/lv2/rnnoise.lv2/librnnoise_lv2 control=50

=> I have an error
nomad@NomadBSD$ pulseaudio -vv
I: [(null)] client.c: Created 4 ā€œUNIX socket clientā€
D: [(null)] module-ladspa-sink.c: Using default input ladspa port mapping
D: [(null)] module-ladspa-sink.c: Using default output ladspa port mapping
E: [(null)] module-ladspa-sink.c: LADSPA module lacks ladspa_descriptor() symbol.
E: [(null)] module.c: Failed to load module ā€œmodule-ladspa-sinkā€ (argument: ā€œsink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/usr/local/lib/lv2/rnnoise.lv2/librnnoise_lv2 control=50ā€): initialization failed.
D: [(null)] cli.c: CLI got EOF from user.
I: [(null)] client.c: Freed 4 ā€œUNIX socket clientā€

I test another plugin with module-ladspa-sink without error maybe syntax is wrongā€¦I canā€™t find if itā€™s normal (LADSPA module lacks ladspa_descriptor() symbol.)

nomad@NomadBSD$ sudo pkg install swhplugins
nomad@NomadBSD$ pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out plugin=mbeq_1197 label=mbeq control=11.621622,10,4.594594,2.702703,0,0,-1.621622,-0.270270,-5.405406,-3.513514,-8.648648,-5.675676,-4.054054,1.351351,9.189189