Nathan, a moderator on our Discord team, took the information found in the project’s documentation for Linux installation and tried to simplify it for the less Linux savvy. This guide uses screenshots from the latest Ubuntu LTS (20.04 at the time of writing). The procedure on other Linux distributions may vary slightly in appearance, but the steps required should be the same.
1. The best first step is to download the latest version for Real-time Noise Suppression from the releases page here:
https://github.com/werman/noise-suppression-for-voice/releases
(If you’re using Fedora or Arch Linux, there are better installation instructions here. Skip to step #4 after following those steps. Other Linux system users will have to install and update manually.)
2. If there is a newer version than the current v0.91, use that one. Then, save that file or (recommended) open it directly with the archive manager.
3. From the archive manager, select extract and save it to a location of your choosing. If you are root (sometimes called sudo or sudoer) I’d personally make a folder for it in “/opt/”, otherwise somewhere in your home folder is fine. In this guide, I saved the contents in “/home/nathan/.rnnoise” (if the folder name starts with a period, it will be hidden unless you tell the file manager to show you hidden files). The home folder name changes with your username.
4. Time to determine what your input device is named for use in PulseAudio. Start by opening a terminal and typing “pactl list sources short” (without the quotes).
The device we want in this case is the only input device (starts with “alsa_input.”). If you have more than one, you’ll need to determine by name which one is the mic you’d like to filter. There should be some mention of the company’s name and/or the product name. You can copy this information into a text editor for use in the next step.
5. Now, go to the official documentation here and find this section:
Copy all of the text in the box starting with the first instance of “pacmd” and paste it into your text editor.
6. Take the input device name from step four and insert it to replace “<your_mic_name>” from the previous step. You’ll also need to point the command to the location of the plugin we downloaded earlier. In this case, replace “/path/to/librnnoise_ladspa.so” with the path from earlier. In my case, that would be “/home/nathan/.rnnoise/bin/ladspa/librnnoise_ladspa.so”
That is all you need to change from that group of commands unless your mic is stereo. ModMics are not stereo, so ModMic users move on to step 7.
If you mic is a stereo mic: Replace “label=noise_suppressor_mono” with “label=noise_suppressor_stereo” and “channels=1” with “channels=2”
7. This next step may not be necessary depending on how you want to use the filter, but it’s probably easiest to do it just in case.
The virtual filter device we’re making is seen as a monitor and some applications won’t allow you to use it as an input. So, you’ll need to add one extra line to you configuration. That line is also available in the documentation.
Here it is for a faster copy/paste:
pacmd load-module module-remap-source source_name=denoised master=mic_denoised_out.monitor channels=1
Copy the text from that box as well and add it to your other commands.
8. Finally, we’re going to save all of this information to a configuration file so that they’ll be run automatically at system startup. The extra steps needed for this are also in the documentation.
Start by removing the leading “pacmd” from all four lines, then add “.include /etc/pulse/default.pa” as a new line at the top of the text file. Then, add another line at the bottom that reads “set-default-source mice_denoised_out.monitor”. These steps ensure the default PulseAudio configuration is included and that the denoised mic is set as your default input device.
The final file should read something like this:
.include /etc/pulse/default.pa
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=/home/nathan/.rnnoise/bin/ladspa/librnnoise_ladspa.so control=50
load-module module-loopback source=alsa_input.usb-Antlion_Audio_Antlion_USB_adapter_20180707-00.mono-fallback sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true
load-module module-remap-source source_name=denoised master=mic_denoised_out.monitor channels=1
set-default-source mic_denoised_out.monitor
9. The final piece of setup is to save this file to the correct location:
It should go in your user folder, inside the “.config/pulse” folder, named “default.pa”. In this case, the full path is “/home/nathan/.config/pulse/default.pa”.
Once that’s done, give your system a reboot.
10. Once the system is back online, you can be sure it’s working right by checking that your system has two new audio devices listed in its settings panel. On Ubuntu, you can access this from the top right panel.
It will be in a section labeled “audio”, “sound” or similar. You should see an output device called “Null Output” and an input device called “Remapped Monitor of Null Output”. That input device is the one you’ll likely want to use as your mic in various programs such as Discord. You may need to change them manually in each program.
If you have any questions, stop by our Discord and ask!