bayesian inference noise reduction implementation
Posted: Wed Dec 22, 2021 7:18 pm
FABADA : "FABADA is a novel non-parametric noise reduction technique which arise from the point of view of Bayesian inference that iteratively evaluates possible smoothed models of the data, obtaining an estimation of the underlying signal that is statistically compatible with the noisy measurements. Iterations stop based on the evidence $E$ and the $\chi^2$ statistic of the last smooth model, and we compute the expected value of the signal as a weighted average of the smooth models. You can find the entire paper describing the new method in (link will be available soon)."
FABADA by https://github.com/PabloMSanAla , https://github.com/paranoya
I have taken it upon myself to implement FABADA for audio. With the help of justin engel to improve stream handling, I now have a very safe version of this program with automatic audio device serialization. The code, I have spent the last week optimizing and improving, and now it is perfected. I have also spoken with one of the FABADA algorithm authors and perhaps some more improvements are possible there. The program does not crash, and it completes its work on my machine within the cpu time allocated. A lot of the code is JIT compiled. This allows the program to process the audio in near realtime.
There is some delay due to the size of buffer it processes. There is also a small problem with some clicking idk how to stop.
This program accepts audio in a variety of bandwidths, however, you must set sample_rate to the sample rate of your audio device, ie 44100, 48000, etc,
and if you change this you must also optimize the time it is allocated to complete each cycle.
Instructions:
https://github.com/falseywinchnet/fabad ... _buffer.py
Download and follow the instructions in this python script.
The binary release is actually slower than this.
By stacking it with other noise reduction methods that do not do very well with noise that is sporadic and diverse, i have achieved nice results.
That is to say, this program doesn't reduce noise as much as it smooths it out. I am now done with it and someone else can take it from here.
I guess i wasn't done with it.
1/12/2022 I still havnt managed to reduce the clicking but the code is now highly, highly, highly vectorized and JIT'd to LLVM behind the scenes.
CPU wise it is not as intensive as it was.
1/15/2022 im back to consuming all of your CPU, now with a GUI.
