DSPRelated.com
Forums

wiener filter implemntation.

Started by "Anil.M.S" May 22, 2006
Hi,
I am currently working on a speech enhancement project. I am
implementing a noise cancellation system using Wiener filter.
>From what I read in the text books and from the net , I got the
transfer function for the filter as

h(f) = {psd(noisySignal) - psd(noiseSignal) }/psd(noisySignal).
I implemented this in matlab ,but the result was a highly distorted
signal.
I have given my procedure, pls suggest me the right way of doing it,
Assumption:First few samples are from pure noise segment.

noise = noise.* hamming(FFT_SIZE)';
FN = fft(noise,FFT_SIZE); %FFT
psdN = (FN.*conj(FN)); % psd of noise.

signal = signal.*hamming(FFT_SIZE)';
FS = fft(signal,FFT_SIZE); %/FFT
psdS = (FS.*conj(FS));

numrtr = psdS.-psdN;
denmntr = psdS;
coef = numrtr./denmntr; % filter TF

% filtering
outF = FS.*coef;
out = ifft(outF,FFT_SIZE);
output = real(out);

Thanks in Advance,
Yajna.