Skip to main content

"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 MIA).

Installation

Install from PyPI:

pip install rnnoise-cli

Or install from source, see development.

Enabling shell completion

The click library offers tab completion for bash, zsh and fish, but it's not installed automatically.

If you downloaded the source, the Makefile can generate the relevant scripts after installing (run make help). Otherwise, generate a script as follows:

_RNNOISE_COMPLETE=bash_source rnnoise > rnnoise_completion.sh

You can replace bash_source with zsh_source or fish_source for other shells. The generated script should be sourced from .bashrc/.zshrc/~/.config/fish/completions/rnnoise.sh.

See the click documentation for more info.

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.

Configuring 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
# control level (0-100), 50 by default
control = 50

Development

The project should work with any Python ≥ 3.7.

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

Credits

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

rnnoise-cli-1.0.3.tar.gz (145.8 kB view details)

Uploaded Source

Built Distribution

rnnoise_cli-1.0.3-py3-none-any.whl (145.3 kB view details)

Uploaded Python 3

File details

Details for the file rnnoise-cli-1.0.3.tar.gz.

File metadata

  • Download URL: rnnoise-cli-1.0.3.tar.gz
  • Upload date:
  • Size: 145.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for rnnoise-cli-1.0.3.tar.gz
Algorithm Hash digest
SHA256 ecc30c0ba95315d5a78d911cf22be5a0bf710714808dc3be1a4c2df7acb68c0a
MD5 30dbe1f98cbc6ae237e2891cd6a60786
BLAKE2b-256 68a9e34c7b99b32714ed7599d2491964894638f2d76860c62ae214e903f3bdc7

See more details on using hashes here.

File details

Details for the file rnnoise_cli-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: rnnoise_cli-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 145.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for rnnoise_cli-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 721560328dd3d999abf799b55b2bf189a14fa6d097a51738ac7e151e08a46299
MD5 f7fcb44e7f44f1b742709b2baf5a8a84
BLAKE2b-256 3f5a9d6b8f9498a28ecdb63dfd6f7c88ff520f6125202cdff3626bd94c91c6f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page