lucianodato / libspecbleach

C library for audio noise reduction and other spectral effects
GNU Lesser General Public License v2.1
63 stars 12 forks source link

Better smoothing #14

Open lucianodato opened 7 years ago

lucianodato commented 7 years ago

Maybe something like proposed in SPECTRAL SUBTRACTION WITH ADAPTIVE AVERAGING OF THE GAIN FUNCTION. Time smoothing between current and past fft_p2 (similar effect to ephraim and malah). Is done by applying a release envelope to signal power spectrum. The best option would be to adaptively smooth 2D spectral components so it will require a bigger buffer as suggested by Lukin in Suppression of Musical Noise Artifacts in Audio Noise Reduction by Adaptive 2D Filtering. Bilateral filter or non local means + DFT (This is the best improvement but it will need a big rehauling of the stft).

lucianodato commented 6 years ago

Other idea is to use Cappe's adaptation of Ephraim-Mallat non linear smoothing for wiener filtering. As suggested in REAL-TIME BROADBAND NOISE REDUCTION paper

lucianodato commented 2 years ago

Try using critical bands and modulating the smoothing based on spectral flatness or directly masking thresholds

SimonG4ELI commented 2 years ago

I can supply 48kHz WAV / MP3 / WMA recordings of noisy HF transmissions if this helps. Your work is excellent.

lucianodato commented 2 years ago

Thanks Simon! You are being too generous with your compliments. I have many more ideas and the motivation to keep going with many of the improvements listed here so development will stay active for a while. And by the way if you have any input given your experience in SDR Console, it's well received. I definitively want this library to be a community thing if possible.

I don't particularly have HF examples so that would be cool!

SimonG4ELI commented 2 years ago

OK, I'll create some WAV files, SDR Console creates @ 48kHz. Link later today I hope.

SimonG4ELI commented 2 years ago

Here's a ZIP with two WAV 48kHz samples https://1drv.ms/u/s!AovWaZDu7HrdgYBuRhbhmNWAOcFvUw?e=OhDFE7.

lucianodato commented 2 years ago

@SimonG4ELI I've been testing these. Quite difficult to treat. I guess the main concern for these is really to improve intelligibility and not really that much to not introduce distortions right? I've found that using the manual learning of the profile with the newly introduced max profile learn works really well. Still the random sine like noises are there.

If you are interested there are recent advancements that Jean Marc Valin and his team has done with respect to these difficult cases https://www.amazon.science/publications/poconet-better-speech-enhancement-with-frequency-positional-embeddings-semi-supervised-conversational-data-and-biased-loss and https://www.amazon.science/publications/a-perceptually-motivated-approach-for-low-complexity-real-time-enhancement-of-fullband-speech

I also plan to do and adaptation of the rnnoise library as a Vocal Activity detector into my algorithms. This could improve also these cases.

Anyway, there's the expose-more-functionality in which I'm working to expose all these internals that you requested.