I have a problem with basic of FFT subtraction. I have signal 80 seconds of recording with microphone - I have signal with birds singing and noise coming from forest. First 10 seconds of my recording is only noise - what I am trying to do is to eliminate it from whole signal. What I am doing now is:
1) Creating mean Noise_FFT from 8 seconds (I receive 8 spectra without overlapping, and then I average them)
2) I obtain FFT_mean_noise – fft mask that I would like to eliminate from my signal
% below I am subtracting FFT_mean_noise from fft(signal) - second by second
for i = Indeks
index = index+1;
FFT_signal = fft(x((i:i+window_length-1),1));
FFT_denoise = FFT_signal- FFT_mean_noise;
Signal_without_noise((i:i+window_length-1),1) = real(ifft(FFT_denoise));
% at the and I am creating FFT from one second of signal with and without noise – there is rather no difference.
FFT_signal_without_noise=abs(fft(Signal_without_noise(one second),NFFT)/L) ;
FFT_dB_ signal_without_noise =20*log10(FFT_signal_without_noise /0.00002);
FFT_dB_ orginal_signal =20*log10(FFT_orginal_signal /0.00002);
plot(f, FFT_dB_ signal_without_,'b', 'Linewidth',1)
plot(f, FFT_dB_ orginal_signal,'green', 'Linewidth',1)
What am I doing in wrong way during subtracting? I found Boll method on File Exchange and it works very well, but I would like to create something like that on my way.