Noise suppression plugin based on Xiph's RNNoise
The plugin is meant to suppress a wide range of noise origins (from original paper): computer fans, office, crowd, airplane, car, train, construction.
From my tests mild background noise is always suppressed, loud sounds, like clicking of mechanical keyboard, are suppressed while there is no voice however they are only reduced in volume when voice is present.
The plugin is made to work with 1 channel and/or 2 channels (ladspa plugin), 16 bit, 48000 Hz audio input. Other sample rates may work, or not...
To check or change mic settings go to "Recording devices" -> "Recording" -> "Properties" of the target mic -> "Advanced".
To enable the plugin in Equalizer APO select "Plugins" -> "VST Plugin" and specify the plugin dll.
The idea is:
sink_masterparameter) and has input sink (
sink_nameparameter, sink will be created).
source) to input sink of plugin (
sink) with 1 channel.
For example, to create a new mono device with noise-reduced audio from your microphone, first, find your mic name using e.g.:
sh pactl list sources short
Then, create the new device using:
sh pacmd load-module module-null-sink sink_name=mic_denoised_out rate=48000 pacmd load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/path/to/librnnoise_ladspa.so control=50 pacmd load-module module-loopback source= sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
This needs to be executed every time PulseAudio is launched. You can automate this by creating file in
~/.config/pulse/default.pawith the content:
load-module module-null-sink sink_name=mic_denoised_out rate=48000 load-module module-ladspa-sink sink_name=mic_raw_in sink_master=mic_denoised_out label=noise_suppressor_mono plugin=/path/to/librnnoise_ladspa.so control=50 load-module module-loopback source=your_mic_name sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
If you have a stereo input use these options instead:
:warning: Chrome and other Chromium based browsers will ignore monitor devices and you will not be able to select the "Monitor of Null Output". To work around this, either use pavucontrol to assign the input to Chrome, or remap this device in PulseAudio to create a regular source:
pacmd load-module module-remap-source source_name=denoised master=mic_denoised_out.monitor channels=1
Additional notes: - You can get
librnnoise_ladspa.soeither by downloading latest release or by compiling it yourself. - You may still need to set correct input for application, this can be done in audio mixer panel (if you have one) in 'Recording' tab where you should set 'Monitor of Null Output' as source.
control=95would be fine. Without the VAD some loud noises may still be a little bit audible when there is no voice.
You will need to compile library yourself following steps below.
It is reported that VST plugin works with Reaper after removing underscore from lib name.
The plugin is tested with Equalizer APO v1.2 x64 (open source system-wide equalizer for Windows) and tested with pulse audio on arch linux.
I'm not associated with the original work in any way and have only superficial understanding of it. The original author will probably create something better out of their work but for now I don't see any analogs with similar capabilities so I have created a usable one.
VST sdk files aren't shipped here due to their license. You need to download VST sdk and copy several files to src/pluginterfaces/vst2.x/ and to src/vst2.x/. You can find sdk here.
LV2 and LADSPA sdk files are in repository.
All improvements are welcomed!
For Windows you either need mingw or hope it works with visual studio cmake generator.
For MacOS steps are the same as for Linux.
If you did not download and place VST sdk files - VST plugin won't be built.
Compiling for x64:
cmake -Bbuild-x64 -H. -DCMAKE_BUILD_TYPE=Release cd build-x64 make
Compiling for x32:
cmake -D CMAKE_CXX_FLAGS=-m32 -D CMAKE_C_FLAGS=-m32 -Bbuild-x32 -H. -DCMAKE_BUILD_TYPE=Release cd build-x32 make
Cross-compiling for Windows x64:
cmake -Bbuild-mingw64 -H. -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release cd build-mingw64 make
By default, all three plugins are being built if the necessary libraries are present. You can deliberately turn off plugins by using the following CMake flags:
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.