FPGA implementation of noise removal

Hi dear developers,

I am currently on a noise removal project. I have tried Audacity and it works perfectly well. When I am trying to implement it on FPGA, it still has background noise left but quieter(NOT as well as Audacity). I am not sure if I missed something. I am listing my two approaches there. If anyone could point out some mistakes, it would be greatly appreciated.

Approach 1(static threshold):

  1. divide the input sample into blocks of 4096 samples with 50% overlapping rate(overlapping 2048 samples)
  2. windowing(hanning) the input blocks with length of 4096
  3. take FFT of the windowed blocks
  4. noise gating the FFT output by comparing the FFT amplitude and static threshold(calculated by Matlab)
  5. IFFT outputs of step 4
  6. windowing IFFT outputs
  7. sum up the output blocks

Approach 2(frequency band threshold):
All the steps are the same as Approach 1 except the threshold is calculated approximately for every 10Hz(44100/4096). The audio output seems even worse than Approach 1.

Audacity’s noise reduction starts with FFT analysis of the noise to create a noise profile. This is an important step that has great impact on the effectiveness of the noise reduction.

When the noise reduction is applied, the algorithm does not gate to silence, but reduces the level by a specified amount that is smoothed across a number of adjacent frequency bands. This helps to reduce metallic / bubbly artefacts.

The original tool was called Noise Removal. It was changed to Noise Reduction (and redesigned) when too many people tried to make the original tool actually remove the noise to nothing. Neither tool will do that. Also, the original tool didn’t do well with rain-in-the-trees white noise (ffffff). White noise is hard. It’s energy of all frequencies and you have to remove it without damaging voice frequencies.

Yes, cellphones do this automatically and that’s why they sound like cellphones. They try and decide which are the constant tones and frequencies and call that noise and delete them. That makes them useless for music. It thinks any sustained musical tone is noise and tries to remove it.

That’s why Audacity has the Profile Step. You the human has to tell Audacity what to remove. Then you can adjust the actual removal step to be best for your show: music or speech.

It works so well there are settings that the notoriously picky ACX AudioBook inspectors can’t detect. They hate noise reduction.



I am also interested in extracting noise_reduction.cpp core functionality and use it without dependency on other audacity features.
@zyf662655, or anyone else managed to pull it off?


That won’t be easy, as built-in effects are subclassed from a common “effect” class.
Nevertheless, you may find the source code for Noise Reduction helpful: https://github.com/audacity/audacity/blob/master/src/effects/NoiseReduction.cpp