I'm trying to code the algorithm described in Speech dereverbaration via maximum-kurtosis subband adaptive filtering by Gillespie, Malvar and Florencio, and the signal looks cleaner in when I plot it. However there are 2 aspects of the results that are worrying me:
- The sound level seems lower than the original when played.
- And the sound comes out muffled.
I'm quite new to speech signal processing so I was wondering whether the latter issues occur commonly or is it just my bad coding?
Here is the part of the code that corresponds to the adaptive filter. I believe it should be the problematic part.
for n=1:500 %Sig is the sum of the product of the FFT of the kusrtosis gradient and %the complex conjugate of the FFT of the LP residual of the reverberant %signal sig=0; ii=1; while ii<length(F)-L sig=sig+sum(F(ii:ii+L).*Yconj(ii:ii+L)); ii=ii+L; end %H is the frequency domain representation of the filter and the following are the update equations %Hpr is G' in the paper Hpr(n+1)=H(n)+(mu/M)*sig; if Hpr(n)==0 || isnan(Hpr(n))==1 H(n+1)=0; else H(n+1)=Hpr(n)/abs(Hpr(n)); end %getting the optimized signal Zt=Yleftres.*H; zt=ifft(Zt); %updating the value of the kurosis gradient q=1:length(zt); while q<length(zt); secmoment=beta*secmoment+(1-beta)*zt(q:q+881).^2; fourthmoment=beta*fourthmoment+(1-beta)*zt(q:q+881).^4; f(q:q+881)=4*(secmoment*(zt(q:q+881).^3)-fourthmoment*zt(q:q+881))/(secmoment.^3); q=q+881; cleaner=isNaN(f(q:q+881)); cleaner=cleaner-1; cleaner=abs(cleaner); f(q:q+881)=cleaner.*f(q:q+881); end F=fft(f); % Hpr(n+1)=H(n)+(mu/M)*sig; end