I have a function that I need to use denoise algorithm on.

What I thought is to divide it to smaller parts and then use Fourier Transform on each one of the parts, but I am not sure what to do next.

Can you please help me and give me few algorithms to recognize noises, if possible algorithm that will fit the structure I described above?

  • $\begingroup$ Do you have noise-only regions? Is the noise uniform across the file? $\endgroup$ – dsp_user Dec 19 '17 at 19:15
  • $\begingroup$ @dsp_user there can be noise-only regions, and for simplicity sake, let's say the noises are static(like a fan going on in the background) $\endgroup$ – Holo Dec 19 '17 at 19:19

Provided that the noise is uniform across your sound and that you have regions where only noise is present, you can make use of a technique called spectral subtraction. The whole process consist of 4 steps.

  1. Find a noise-only region and apply an FFT on it in order to obtain the noise profile (noise spectrum). The longer the noise region, the better the noise profile (resolution) you'll get (use longer FFT lengths)

  2. Apply FFT on your entire sound. This way, you'll get the spectrum for both the signal (people talking) as well as the noise.

  3. Subtract the noise profile from the overall sound spectrum (2-1). Ideally, you'll end up with the signal-only spectrum (of course, some noise will still remain).

  4. Perform an inverse FFT on the signal spectrum obtained in step #3 to get a time-domain signal (waveform) .

If the filtered signal still has some unwanted artifacts, you may try to interpolate the signal spectrum prior to performing the IFFT (step 4)

Note that you don't have to break up your signal into smaller chunks (this is not STFT)

  • $\begingroup$ (1) if i do not know where the noise only region is, is there a way to find it? (2) in stem #3, when you say subtract the noise profile, do you mean just to take the set i for from #2 and subtract the set i got from #1? $\endgroup$ – Holo Dec 19 '17 at 23:09
  • $\begingroup$ 1) if there are no noise-only regions, you won't be able to use this technique 2) yes $\endgroup$ – dsp_user Dec 19 '17 at 23:12
  • $\begingroup$ if there is noise only region but i dont know where it is, is there a way to find it? and if i dostep #3 won't it make my data sample smaller and then IFFT will return to me shortest file? $\endgroup$ – Holo Dec 19 '17 at 23:48
  • $\begingroup$ If you can listen to your sound, you will know where it (noise-only region) is. If , on the other hand, you want your program to determine that, you can try calculating the spectral flux. For example, divide your audio into multiple frames (STFT) and do an FFT for every frame. Then calculate the spectral flux between any two adjacent frames (i.e between frame1 and 2, 2 and 3, 3 and 4 and so on). The idea here is that the spectral flux for noisy regions should be relatively constant across multiple frames (because we said that the noise profile is uniform). $\endgroup$ – dsp_user Dec 20 '17 at 7:03
  • $\begingroup$ one (hopefully) last question, the part of subtraction confusing me, i have a set from #1 and a set from #2, to subtract is to do setminus action? just to delete from #2 all the value that appear in #1? it sounds weird to me for some reason $\endgroup$ – Holo Dec 20 '17 at 15:40

There is a lot of research currently going on under the umbrella of terms like “blind source separation”, “independent components analysis (ICA)” “cocktail party problem” and some older work using the singular value decomposition, and the EM algorithm. People have used neural networks to attack the general problem. Of course, every paper claims success or at least future work that will succeed. These inverse problems are “ill posed” to greater or lesser extent. The seductive aspect of this problem is that humans and probably most animals have some ability to separate sources.

You should spend some time with Google using some of the search terms mentioned. The spectral subtraction method mentioned is also worth consideration.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.