Forums

Wiener Filtering of speech simulation in Matlab

Started by fara...@yahoo.co.uk November 5, 2008
I am working on a project of noise reduction for speech with Wiener Filtering. I am writing the code in Matlab. I have computed the PSD of noisy signal and noise (Considering that the noise is the first few samples prom the noisy signal) and the Wiener Filter transfer function. The Filter characteristic however turns out like an all-pass filter, so the filtered signal resembles teh noisy signal totally. Could you please give me some suggestions what to do? I post teh code of my application so far:

L=length(wave1);

%adding noise
wave=wave1+max(wave1)*randn(size(wave1),1)*0.1;

noise=wave(1:512);
for iQ3:L
noise(i)=0;
end;

NFFT=2^nextpow2(L);
yt(wave,NFFT);
Pyy=y.*conj(y); %Noisy signal PSD
Nt(noise,NFFT);
Pnn=N.*conj(N)/NFFT; %PSD of noise

%Wiener Filter Transfer Function
nom=Pyy-Pnn;
den=Pyy;
Wiener=nom./den;

%Wiener Filtering
O=y.*Wiener;
o=ifft(O,NFFT);
output=real(o(1:L));
subplot(5,1,5);
plot(output);

Thanks a lot for your help!!!