A CLI for werman's noise-suppression-for-voice
Project description
rnnoise-cli
A CLI wrapper for the LADSPA plugin at https://github.com/werman/noise-suppression-for-voice. To be used with systems running PulseAudio (basically any Linux distro). This was written out of frustration that Discord+Krisp is unavailable on Linux. If you'd like a GUI alternative, check out Cadmus (as of May 2021, it has some issues and the developer seems to be IMA).
Installation
Install from PyPI:
pip install rnnoise-cli
Or install from source, see development.
Usage
rnnoise activate
It will show a list of eligible input devices and prompt you to select one.
You can use --control
to set the control level.
Control level 0 means only try to filter noise and never cut to silence,
100 means silence unless RNNoise is 100% sure you're talking.
The default of 50 means that if RNNoise determines the probability that you're talking to be below 50%,
the output will be silent.
Your strategy should be to start at the default of 50 and go up if it blocks too little or down if your voice is
cutting out while talking.
A new input option named "RNNoise Denoised Microphone" should now be available to your system.
Check out rnnoise --help
for more commands.
Configure defaults
Defaults are optionally loaded from ~/.config/rnnoise_cli/rnnoise_cli.conf
.
These settings are overridden by the corresponding options when provided (e.g. --device
, see rnnoise --help
).
Example config with currently supported options:
[activate]
# device to use, omitted by default
# `rnnoise activate` will prompt for it if omitted (and provide a list of options)
device = "some.device.name"
# sampling rate, omitted by default
# `rnnoise activate` will automatically get the right rate if omitted
rate = 44100
# control level (0-100), 50 by default
control = 50
Development
The project should work with any Python ≥ 3.6.
Create a virtual environment:
python3 -m venv venv
# activate or alternatively configure IDE (e.g. PyCharm) to use the env's interpreter
source venv/bin/activate
Install dev requirements:
# this runs pip install -r requirements.txt
make init
Check out the noise-suppression-for-voice releases
and extract librnnoise_ladspa.so
to the res
folder of this project (or build librnnoise_ladspa.so
from source).
You can then install rnnoise-cli from source into the virtual environment using:
pip install .
rnnoise --help
There are no tests yet, but it should be possible to formally test click commands (https://click.palletsprojects.com/en/7.x/testing/).
Credits
- Uses the plugin from: https://github.com/werman/noise-suppression-for-voice
- The plugin above is in turn based on a recurrent neural network https://github.com/xiph/rnnoise
- Initially based on the work at https://github.com/josh-richardson/cadmus
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for rnnoise_cli-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11771d78e7f1c9602c2484a82963b87686777aba15d46ece5a37b5042e086bfa |
|
MD5 | 0e3460d5448782a31d3439cb94cb92fc |
|
BLAKE2b-256 | 2f6bce702cd66b230f00dc865e96c778bad81d9ebe996159fe5814e3077ec60a |