{"id":13437590,"url":"https://github.com/werman/noise-suppression-for-voice","last_synced_at":"2025-05-14T03:06:53.983Z","repository":{"id":37734960,"uuid":"118370558","full_name":"werman/noise-suppression-for-voice","owner":"werman","description":"Noise suppression plugin based on Xiph's RNNoise","archived":false,"fork":false,"pushed_at":"2024-05-18T17:59:46.000Z","size":31330,"stargazers_count":5577,"open_issues_count":93,"forks_count":249,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-05-12T16:15:26.658Z","etag":null,"topics":["au-plugin","auv3-plugin","ladspa","lv2-plugin","noise-cancellation","voice","vst-plugin","vst2","vst3-plugin"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/werman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-21T20:21:13.000Z","updated_at":"2025-05-12T13:35:16.000Z","dependencies_parsed_at":"2023-01-31T03:15:35.851Z","dependency_job_id":"6cc6f539-b409-48f5-8445-1da2bc7c58ed","html_url":"https://github.com/werman/noise-suppression-for-voice","commit_stats":{"total_commits":85,"total_committers":15,"mean_commits":5.666666666666667,"dds":0.6,"last_synced_commit":"c1cf4307c75abed8e3ecccdd23a35f7782feaf69"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werman%2Fnoise-suppression-for-voice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werman%2Fnoise-suppression-for-voice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werman%2Fnoise-suppression-for-voice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/werman%2Fnoise-suppression-for-voice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/werman","download_url":"https://codeload.github.com/werman/noise-suppression-for-voice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059500,"owners_count":22007768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["au-plugin","auv3-plugin","ladspa","lv2-plugin","noise-cancellation","voice","vst-plugin","vst2","vst3-plugin"],"created_at":"2024-07-31T03:00:58.535Z","updated_at":"2025-05-14T03:06:48.973Z","avatar_url":"https://github.com/werman.png","language":"C++","funding_links":[],"categories":["C","C++","语音识别与合成_其他","Multimedia","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++"],"sub_categories":["网络服务_其他","Media Servers"],"readme":"\u003ch1 align=\"center\" style=\"line-height:0;\"\u003eReal-time Noise Suppression Plugin\u003c/h1\u003e\n\u003ch2 align=\"center\" \u003eVST2, VST3, LV2, LADSPA, AU, AUv3\u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"\"\u003e[![Licence][licence]][licence-url]\u003c/a\u003e\n\u003ca href=\"\"\u003e[![Latest][version]][version-url]\u003c/a\u003e\n\n\u003c/div\u003e\n\n[licence]: https://img.shields.io/badge/License-GPLv3-blue.svg\n[licence-url]: https://www.gnu.org/licenses/gpl-3.0\n[version]: https://img.shields.io/github/v/release/werman/noise-suppression-for-voice?label=Latest\u0026style=flat\n[version-url]: https://github.com/werman/noise-suppression-for-voice/releases\n\nA real-time noise suppression plugin for voice based on [Xiph's RNNoise](https://github.com/xiph/rnnoise). [More info about the base library](https://people.xiph.org/~jm/demo/rnnoise/).\n\nThe plugin is meant to suppress a wide range of noise origins ([from original paper](https://arxiv.org/pdf/1709.08243.pdf)): computer fans, office, crowd, airplane, car, train, construction. \n\nFrom 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. \n\nPlease note that this plugin could not improve the voice quality with bad microphone, it even could make things worse by misclassifying the voice as a noise which would reduce already not-so-good voice quality.  \n\nThe plugin works with one or more channels, 16 bit, 48000 Hz audio input.\n\n:exclamation: :exclamation: :exclamation: Do NOT use any other sample rates, use ONLY 48000 Hz, make sure your audio source is 48000 Hz and force it to be 48000 Hz if it is not.\n\nThere is a minimalistic GUI with all parameters and diagnostic stats:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://i.imgur.com/xPkoqlU.png\" alt=\"GUI of the plugin\"\u003e\n\u003c/div\u003e\n\n## Releases\n\n[Latest releases](https://github.com/werman/noise-suppression-for-voice/releases)\n\n## How-to\n\n### Plugin Settings\n\n- `VAD Threshold (%)` - if probability of sound being a voice is lower than this threshold - it will be silenced.\n  In most cases the threshold between 85% - 95% would be fine.\n  Without the VAD some loud noises may still be a bit audible when there is no voice.\n- `VAD Grace Period (ms)` - for how long after the last voice detection the output won't be silenced. This helps when ends of words/sentences are being cut off.\n- `Retroactive VAD Grace Period (ms)` - similar to `VAD Grace Period (ms)` but for starts of words/sentences. :warning: This introduces latency!\n\n### Windows + Equalizer APO (VST2)\n\nTo check or change mic settings go to \"Recording devices\" -\u003e \"Recording\" -\u003e \"Properties\" of the target mic -\u003e \"Advanced\".\n\nTo enable the plugin in Equalizer APO select \"Plugins\" -\u003e \"VST Plugin\" and specify the plugin dll.\n\nSee [detailed guide](https://medium.com/@bssankaran/free-and-open-source-software-noise-cancelling-for-working-from-home-edb1b4e9764e) provided by  [@bssankaran](https://github.com/bssankaran).\n\n- v1.0: Now there is a GUI, so it became easy to change parameters. \n\n### Linux\n\n#### PipeWire\n\nSince version `0.3.45` PipeWire uses [Split-File Configuration](https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-PipeWire#split-file-configuration), making it extremely easy to set up plugins and tweak configuration.\n\nFor older PipeWire version you'd have to copy `/usr/share/pipewire/pipewire.conf` into `~/.config/pipewire/pipewire.conf` and then append the configuration below to already existing `context.modules`.\n\nFor PipeWire \u003e= `0.3.45` you should:\n\n- Create config directory: `~/.config/pipewire/pipewire.conf.d/`\n- Create config for plugin: `~/.config/pipewire/pipewire.conf.d/99-input-denoising.conf`\n- Paste configuration:\n```\ncontext.modules = [\n{   name = libpipewire-module-filter-chain\n    args = {\n        node.description =  \"Noise Canceling source\"\n        media.name =  \"Noise Canceling source\"\n        filter.graph = {\n            nodes = [\n                {\n                    type = ladspa\n                    name = rnnoise\n                    plugin = /path/to/librnnoise_ladspa.so\n                    label = noise_suppressor_mono\n                    control = {\n                        \"VAD Threshold (%)\" = 50.0\n                        \"VAD Grace Period (ms)\" = 200\n                        \"Retroactive VAD Grace (ms)\" = 0\n                    }\n                }\n            ]\n        }\n        capture.props = {\n            node.name =  \"capture.rnnoise_source\"\n            node.passive = true\n            audio.rate = 48000\n        }\n        playback.props = {\n            node.name =  \"rnnoise_source\"\n            media.class = Audio/Source\n            audio.rate = 48000\n        }\n    }\n}\n]\n```\n\n- Change `/path/to/librnnoise_ladspa.so` to actual library path\n- If you are **absolutely** sure that you need stereo output - change `noise_suppressor_mono` -\u003e `noise_suppressor_stereo`. Even if your mic says that it is stereo - you probably don't need stereo output. It also would consume 2x resources.\n- Configure plugin parameters: `VAD Threshold (%)`, ...\n- Restart PipeWire: `systemctl restart --user pipewire.service`\n- Now you should be able to select `Noise Canceling source` as input device\n\nFor more information consult PipeWire documentation on [Filter-Chains](https://docs.pipewire.org/page_module_filter_chain.html)\n\nTroubleshooting:\n- TODO, how to change sample rate for mic.\n\nAlternative solutions for PipeWire/PulseAudio configuration which also use RNNoise:\n- [EasyEffects](https://github.com/wwmm/easyeffects) - a general solution for audio effects GUI for PipeWire. Easy to set up and use. Fewer settings for denoising. Available on Flathub.\n- [NoiseTorch](https://github.com/noisetorch/NoiseTorch) - easy to set up, works with PulseAudio and Pipewire. Fewer settings for denoising.\n\n#### PulseAudio\n\nTLDR: Use PipeWire... or follow the instructions below.\n\n\u003cdetails\u003e\n\u003csummary\u003eInstructions (click me)\u003c/summary\u003e\n\nThe idea is:\n\n- Create a sink from which apps will take audio later and which will be the end sink in the chain.\n- Load the plugin which outputs to already created sink (`sink_master` parameter) and has input sink (`sink_name` parameter, sink will be created).\n- Create loopback from microphone (`source`) to input sink of plugin (`sink`) with 1 channel.\n\nFor example, to create a new mono device with noise-reduced audio from your microphone, first, find your mic name using e.g.:\n```sh\npactl list sources short\n```\n\nThen, create the new device using:\n```sh\npacmd load-module module-null-sink sink_name=mic_denoised_out rate=48000\npacmd 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,20,0,0,0\npacmd load-module module-loopback source=\u003cyour_mic_name\u003e sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true\n```\n\nThis needs to be executed every time PulseAudio is launched.\nYou can automate this by creating file in `~/.config/pulse/default.pa` with the content:\n\n```\n.include /etc/pulse/default.pa\n\nload-module module-null-sink sink_name=mic_denoised_out rate=48000\nload-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,200,0,0,0\nload-module module-loopback source=your_mic_name sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true\n\nset-default-source mic_denoised_out.monitor\n```\n\nThe order of settings in `control=50,200,0,0,0` is: `VAD Threshold (%)`, `VAD Grace Period (ms)`, `Retroactive VAD Grace Period (ms)`, `Placeholder1`, `Placeholder2`.\n\nIf you are absolutely sure that you want a stereo input use these options instead:\n\n- `label=noise_suppressor_stereo`\n- `channels=2`\n\nIf you have problems with audio crackling or high / periodically increasing latency, adding `latency_msec=1` to the loopback might help:\n```\nload-module module-loopback source=your_mic_name sink=mic_raw_in channels=1 source_dont_move=true sink_dont_move=true latency_msec=1\n```\n\n:warning: Chrome and other Chromium based browsers will ignore monitor devices and you will not be able to select the \"Monitor of Null Output\".\nTo work around this, either use pavucontrol to assign the input to Chrome, or remap this device in PulseAudio to create a regular source:\n\n```sh\npacmd load-module module-remap-source source_name=denoised master=mic_denoised_out.monitor channels=1\n```\n\nYou 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.\n\nFurther reading:\n\n- Useful detailed info about PulseAudio logic [toadjaune/pulseaudio-config](https://github.com/toadjaune/pulseaudio-config).\n- The [thread](https://bugs.freedesktop.org/show_bug.cgi?id=101043) which helped me with how to post-process mic output and make it available to applications.\n\n\u003c/details\u003e\n\n### MacOS\n\nTODO, contributions are welcomed!\n\n## Status\n\nThe plugin is tested with:\n- Equalizer APO v1.2 x64 (open source system-wide equalizer for Windows)\n- PipeWire on Arch Linux\n- Carla (on Linux)\n- Audacity (on Linux)\n\nI'm not associated with the original RNNoise work and do NOT have any understanding of recurrent neural networks it is based upon.\n\n## Contributing\n\nExternal dependencies are vendored via [git-subrepo](https://github.com/ingydotnet/git-subrepo). So that there is no need to use submodules, and patching subrepos is easy (at the moment we have several patches for JUCE).\n\nImprovements are welcomed! Though if you want to contribute anything sizeable - open an issue first.\n\n### Compiling\n\nCompiling for x64:\n```sh\ncmake -Bbuild-x64 -H. -GNinja -DCMAKE_BUILD_TYPE=Release\nninja -C build-x64\n```\n\nCompiling for x32:\n```sh\ncmake -D CMAKE_CXX_FLAGS=-m32 -D CMAKE_C_FLAGS=-m32 -Bbuild-x32 -H. -GNinja -DCMAKE_BUILD_TYPE=Release\nninja -C build-x32\n```\n\nCross-compiling for Windows x64 (MinGW builds are failing at the moment due to certain incompatibilities in JUCE):\n```sh\ncmake -Bbuild-mingw64 -H. -GNinja -DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release\nninja -C build-mingw64\n```\n\n#### Compiling only selected plugins\n\nBy default, all plugins supported for a platform are being built.\nYou can deliberately turn off plugins with the following CMake flags:\n\n- `BUILD_LADSPA_PLUGIN`\n- `BUILD_VST_PLUGIN`\n- `BUILD_VST3_PLUGIN`\n- `BUILD_LV2_PLUGIN`\n- `BUILD_AU_PLUGIN` (macOS only)\n- `BUILD_AUV3_PLUGIN` (macOS only)\n\nFor example:\n\n```sh\ncmake -DBUILD_VST_PLUGIN=OFF -DBUILD_LV2_PLUGIN=OFF\n```\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.\n\nUsed libraries:\n- [JUCE](https://github.com/juce-framework/JUCE) is used under GPLv3 license\n- [FST](https://git.iem.at/zmoelnig/FST/) - GPLv3\n- [catch2](https://github.com/catchorg/Catch2) - BSL-1.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerman%2Fnoise-suppression-for-voice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwerman%2Fnoise-suppression-for-voice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwerman%2Fnoise-suppression-for-voice/lists"}