Removing Noise from sound wave using fft

I am trying to remove background noise from an audio. I have applyed fft and zeroed the low amplitude frequency. Anyone has any idea about this? Attached are signal before and after denoised. I get even more noise after applying ifft.

2 Comments

Hello,
I am stuggling to understand the resoning behind this. An FFT will provide an outline of where the frequency manifests, this allows underirable frequencies to be identified. Once these undesired frequencies have been identified, filters must be designed to remove the undesired frequencies.
You should also note that the FFT function uses the first 'N' number of samples therefore ensure you are using an approperate number of samples for 'N'.
  • What filters have you applied?
  • What does the FFT look like pre and post filtering
Once we know this we should be able to offer more insight as to whats going on.
If you have applied filters another common mistake is to increase the filter order as much as possiable, while this produces a steeper cut off response it also adds ringing into the signal as a form of distortion which could be the problem.
Kind regards,
Christopher
Hi and thank you Christopher, the filter I applied is zeroing the frequencies when the amplitude of fft signal is lower than a value. Attached pictures are FFT function before and after filtering.

Sign in to comment.

Answers (1)

Hi,
Did you perform the followings:
...
n = length(t); % Time
Fhat = fft(F, n); % FFT of F signal
PSD = Fhat.*conj(Fhat)/n; % PSD of FFTed signal
freq = 1/(dt*n)*(0:n); % Frequency values
L = 1:floor(n/2); % Length o signal
Indices = PSD>100; % Find all freqs with large power
Fhat =Indices.*Fhat; % Zeroing all small Fourier coeff.'s
FFilt = ifft(Fhat); % Inverse of FFT for filtered time signal
...

6 Comments

Programming is a math that does not like "likely". It has to be or not.
I did perform like the way you did.
Did you choose the right range of PSD to diminish the noise content frequencies? Note that as an example I am using here PSD>100. A different PSD limit value should work in your case. This is the very crucial point to filter the noise components of the signal.
Yes, I did. But my problem right now is I have no idea why my filtered audio consists of additional noise which does not exist in my original audio.

Sign in to comment.

Tags

Asked:

on 21 May 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!