10 ms·
NoiseTorch: Real-time microphone noise suppression on Linux written in Go
- sahoo 6y agoOnly if the sound card was detected in Linux. Sigh.
- shock 6y agoWhat do you mean? NoiseTorch deals with PulseAudio, it doesn't deal with hardware directly, so, yes, Linux needs to have a driver for your soundcard.
- sahoo 6y agoI mean, is there a non linux port?
- formerly_proven 6y agoAre you implying I can't do any sound I/O without having a driver for said I/O? Preposterous.
- PaulDavisThe1st 6y agoThat's trivially correct. You can't get anything on a screen without a driver for your graphics card. You can't get any input from a keyboard without a driver for the keyboard. However, Linux comes with drivers for more or less every audio interface that is possible to use on Linux. That is, there are essentially no 3rd party drivers - it either works with the drivers in the kernel(1) or it doesn't. (1) depending on how your distro built the drivers. for the most part, things are OK.
- kochthesecond 6y agoThis is pretty cool!
- formerly_proven 6y agoMost noise suppression I've seen so far can shave off a few dB (worth gold already), but when you try to suppress more noise it always starts to impact the signal very negatively. Interesting to see whether these ML approaches can do better. I suspect they might depend even more on the type of your voice than conventional noise suppression.
- fred123 6y agoNote that most state of the art machine learning based denoising models perform MUCH better than rnnoise quality wise, but they are mostly not tuned for real time use. If you’re interested, have a look at some of the Interspeech 2020 Deep Noise Suppression submissions.
- fred123 6y agoSome examples here: https://paperswithcode.com/task/speech-enhancement https://paperswithcode.com/task/speech-enhancement Some of them have audio samples.
- drblah 6y agoAs far as I can see this uses RNNoise. If you haven't checked it out yet you should, because it is simply amazing. It is a super effective noise gate / noise removal tool that does not require any configuration whatsoever. My study mates and I have been using it over the last four months when working from home. It removes the noise of keyboards, seaguls and vacuum cleaners. It is essentially the same as Nvidia RTX voice except it is much lighter on the system and does not require an Nvidia GPU. In our testing RNNoise performs similarly. This project looks super cool. It seems to make RNNoise much more accessible. Normally you would have to manually set up the pulseaudio plumbing for this to work.
- swyx 6y agodo you need Linux to run your version? would love to get this running on my Mac.
- drblah 6y agoI have mainly used the built in RNNoise support in Mumble. But you can use https://github.com/werman/noise-suppression-for-voice/ https://github.com/werman/noise-suppression-for-voice/ and build the VST plugin (This is also what NoiseTorch uses i think). Then use any application that can load VST plugins to pipe your mic through. I have had reasonably good luck with it on Windows with Equalizer APO.
- tyfon 6y agoSomeone also recently made a plugin [1] for OBS using this. [1] https://gitlab.com/gravydanger/obs-rnnoise/ https://gitlab.com/gravydanger/obs-rnnoise/
- kaielvin 6y agoAlternatively there is the pulseaudio module: module-echo-cancel (https://askubuntu.com/questions/18958/realtime-noise-removal-with-pulseaudio https://askubuntu.com/questions/18958/realtime-noise-removal...), which I have been using so far. I haven't tried NoiseTorch yet. How do the two compare?
- lawl 6y agoHey everyone author here! Awesome to see this on HN. I'm happy to answer any questions, but this is a slightly inopportune moment to hit HN for me as I need to leave soon :) Some responses might be delayed by a day or so!
- kaielvin 6y agoThanks for the work. Is incorporating NoiseTorch into pulseEffects something that could be considered? The interest being to have all filters managed under one app.
- lawl 6y agoI've seen pulseeffects mentioned a few times, I must admit that I don't know exactly what it is and will need to research it first.
- nickjj 6y agoI'm not saying this tool is bad but I would be really careful about using tools like this in an environment where audio quality really matters (Youtube videos, podcasts, etc.). Noise reduction tools work by removing specific frequencies from the source, some of which overlap with your natural voice. This is why you start to sound robotic and get weird cutouts if you try to use tools to remove too much noise or background sounds. It's one of those things where, if you're not used to hearing your entire vocal range, you might not be aware at how much is getting cut out from tools that reduce noise. It's too bad they don't have a before / after with a few voice samples in the readme.
- asutekku 6y agoThe difference in here is that RNNoise does not just remove some specific frequency, it uses neural networks to remove it which results in much higher quality compared to what you were implying.
- lawl 6y agoHey (author here) I have personally not noticed voice quality suffering too much, but you are of course right. And this is not what it was made for. My personal use case is mostly voip where RNNoise (imo) does an amazing job.
- nickjj 6y agoWould it be possible to upload a few before / after samples with varying degrees of background noise? Even if it's all the same person that would be a huge help to gauge the quality.
- manojlds 6y agoAny of these remove dog barking noise?
- speedgoose 6y agoI would guess. RTX Voice removes my cat's sounds.
- manojlds 6y agoYeah but with my rudimentary skills I struggled with dog barks as they are closer to our speech.
- dsteinman 6y agoThis might be useful to use along side with DeepSpeech (https://github.com/mozilla/DeepSpeech https://github.com/mozilla/DeepSpeech), which doesn't work very well in noisy environments.
- bhouston 6y agoThis should be included in Linux by default it is this good. :) Or at least available via apt-get.
- charliebrownau 6y agoGday Anyone know of some good audio/sound tools for those still using ALSA and stopped using or uninstalled PULSE ?
- captn3m0 6y agonoisetorch-bin and noisetorch-git packages already on AUR: https://aur.archlinux.org/packages/?O=0&SeB=nd&K=noisetorch&outdated=&SB=n&SO=a&PP=50&do_Search=Go https://aur.archlinux.org/packages/?O=0&SeB=nd&K=noisetorch&...
- gingerlime 6y agoAnything similar for MacOS ? I tried krisp.ai which is nice but seems too heavy on my 2015 MacBook Air together with zoom
- wenc 6y agoVery nice. Krisp.ai is a commercial option, and NVIDIA RTX is free but requires a CUDA card, so this is a great alternative. Noise suppression is becoming more and more common. My Jabra headset has it built in.
- kbouck 6y agoWhen testing Krisp.ai, I recorded myself speaking inches away from a noisy water boiler. In the playback, I could not even hear the water boiler, but voice came through clearly. Signed up for the service immediately after that.
- orware 6y agoI signed up for it too last weekend after coming across it after doing some research (I had been making a bunch of video recordings a few days prior, and once the videos were added into Camtasia and the audio played back I noticed a lot of background hum coming from my HVAC return outside of the room I'm in). Was impressed with the Krisp.ai tech as well and probably works similarly to this tool and the other Nvidia solution that I can't try out since I don't have an RTX card (main difference might be the overall training set that Krisp has already run their algorithm through?). I haven't had any Zoom meetings since purchasing Krisp, but I had been using the built-in mic from my LG Tone headset for those meetings. Since making those video recordings I've been using my blue Yeti mic (and a pair of headphones connected to the mic for listening) as my primary and I've continued running a bunch of small tests to try and see if I can be happy with using Krisp enabled all the time. Currently, I don't feel comfortable with leaving it on all of the time though for recordings, particularly with something like the blue Yeti mic which is able to capture pretty rich audio. In my testing, Krisp did a great job of eliminating the background HVAC humming noise, but replaced that issue with two others: some minor (but distracting) hiss/noise between words as I'm playing back the recorded audio, and also currently is limited to 16000mhz frequency (not sure if mhz is correct or not in this case...this is what support shared with me when I asked about audio quality degradation). The support person did respond though and say that the team is working on the increasing the frequencies they are able to work with though so I guess there might be some improvements in the near future on it? After seeing the latency figures on the NoiseTorch page it makes me wonder if the Krisp latency is similar or not (so far I haven't noticed any latency issues with Krisp). As far as remaining thoughts...I kind of wish there was a bit more configuration options available for Krisp, but the simplicity of it is also a benefit (for others that might not be as technical and just want a simple solution that does appear to work overall). I haven't gotten it to work for playback needs (it has the toggle for it, but nothing seems to happen when I try and toggle that on). Also, still not sure what the overall differences/improvements with Krisp Rooms enabled (I am recording in a room, but after reading their description/blog announcement page it kind of seems like it's more for conference rooms where multiple people are speaking and extra echo cancellation might be useful? ref: https://krisp.ai/blog/krisp-rooms-launch/ https://krisp.ai/blog/krisp-rooms-launch/) Since I'm already out with a year subscription with them I'll continue to try and figure out how to use it effectively, but not as excited about it at the moment compared to how I was last weekend initially (impressive overall though...hopefully it continues to improve :-).
- tazjin 6y agoI've recently built the inverse of this using NSFV (https://github.com/werman/noise-suppression-for-voice https://github.com/werman/noise-suppression-for-voice), i.e. suppressing noise in incoming audio. A lot of people - despite being forced to work from home - simply don't seem to care about the way their audio sounds. Many don't even try to tackle these problems after it's been pointed out to them that they're being a nuisance in online meetings. I gave up on trying to help people fix their setups, or convincing them that it matters, and switched to doing this on the receiver end. It's been a massive quality-of-life improvement. If you're interested in the setup, you basically just need a small script that loads the pulseaudio plugin and wires up the sources/sinks correctly. My setup script is here: https://cs.tvl.fyi/depot@canon/-/blob/tools/nsfv-setup/default.nix https://cs.tvl.fyi/depot@canon/-/blob/tools/nsfv-setup/defau... And some more context: https://cl.tvl.fyi/c/depot/+/578 https://cl.tvl.fyi/c/depot/+/578
- basilgohar 6y agoI think this is an out-of-sight, out-of-mind kind of issue. They simply don't understand how their noise, which they do not perceive, can be so detrimental to others. Moreover, a lot of people simply can't grasp the difference good hardware or even just a different setup (moving away from noise sources like fans, open windows, appliances running, etc.) can impact the quality of their sound. Lastly, a lot of people either cannot or think they cannot do anything about it, so they dismiss others' concerns because "everyone else has problems too", equating their noise to be the same as others'.
- sdwvit 6y agoOr they simply don’t care or don’t want to invest effort into solving it ️
- basilgohar 6y agoThis is always a possibility, but we can kill ourselves if we try to figure who's sincere and who's not.
- 6y ago
- Abishek_Muthian 6y agoNicely done! I went through some core libraries being used in the project, there's a pure Go pulseaudio implementation[1] which seems to deserve few more stars and the GUI framework nucular[2] seems support even metal rendering on macOS. I like how the native GUI frameworks for Go are becoming viable alternative to Qt. Off-topic, Since this thread might attract audio programmers- I was looking at ambient noise cancellation, audio amplification implementation for TWS earphones(BL 5.0) without those features on Android[3], would the latency defeat the purpose because it isn't implemented on device and does android bluetooth/audio APIs provide necessary access to implement such features in an app? [1]https://github.com/lawl/pulseaudio https://github.com/lawl/pulseaudio [2]https://github.com/aarzilli/nucular https://github.com/aarzilli/nucular [3]https://needgap.com/problems/22-enabling-hearing-aid-features-on-tws-earphones-audio-hearingaid https://needgap.com/problems/22-enabling-hearing-aid-feature...
- ACAVJW4H 6y agoIt might be a stupid question but, aside from the obvious benefits of saving bandwidth by omitting useless noise in transport, doesn't it make sense to employ these technologies server-side? One could maybe make Jitsi or BigBlueButton use similar technologies? It would make it much more ubiquitous, better platform support (would work on mobile or low CPU/GPU clients) and also save on system provisioning as maybe the neural net could be utilized better by running for different audio sources concurrently
- bufferoverflow 6y agoAs a system owner, it makes financial sense to do it on the client. Imagine you're managing Zoom. You will need tens of thousands of GPUs running 24/7 just for noise suppression.
- kaielvin 6y agoI believe Discords does a lot of noise filtering and cutting-off. I suspect it is server-side (given that they have a web app), but I am not certain.
- spacechild1 6y agoI know that Zoom does noise reduction and echo cancellation by default, but I don't know if they do it client-side or server-side (for peer-to-peer calls it has to be client-side, obviously)
- thomasfedb 6y agoI read NoseTorch, was intrigued.
- 42droids 6y agoThank you for making this, I really can't wait to try it. In fact, I am now shocked this didn't exist before... :)
- jcastro 6y agoI've been using this for the past few days and it's been fantastic, every distro should just do this out of the box.
- freedomben 6y agoIs this using GTK? What bindings?
- hu3 6y agoNot GTK but https://github.com/aarzilli/nucular https://github.com/aarzilli/nucular which is a Go port of https://github.com/vurtun/nuklear https://github.com/vurtun/nuklear
- sandworm101 6y agoDoes noise suppression work in reverse? Can I use it to isolate the noise from the human voices? There are lots of situations where someone might want to isolate and analyse background noises or conversations.
- fred123 6y agoYes. Noise suppression is very similar to speech separation (separating multiple speaker voices that talk at the same time). For example you can use ConvTasNet for both speech separation and denoising; in the denoising case you set target track 1 = speech, track 2 = noise, hence you get a noise-only track. I guess you can also simply subtract the clean speech from the original mixture to get the noise-only track.
- hu3 6y agoI'm curious about the impact of Go's Garbage Collection in a real-time project like this. From reading past comments in other Go related threads I was led to believe this was impossible to achieve with Go. I'm talking about threads like this: https://news.ycombinator.com/item?id=21036037 https://news.ycombinator.com/item?id=21036037
- rstuart4133 6y agoFrom the developer of RNNoise, which is the technique being used here: "As strange as it may sound, you should not be expecting an increase in intelligibility. Humans are so good at understanding speech in noise that an enhancement algorithm — especially one that isn't allowed to look ahead of the speech it's denoising — can only destroy information. So why are we doing this in the first place? For quality. The enhanced speech is much less annoying to listen to and likely causes less listener fatigue" https://jmvalin.ca/demo/rnnoise/ https://jmvalin.ca/demo/rnnoise/
- ped4enko 6y agoHow well did you choose the Golang for this task?