# Speech dereverbaration via maximum kurtosis adaptive filtering

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:

1. The sound level seems lower than the original when played.
2. 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 • While interesting, I am afraid that the question appears to be too broad or unclear. It is hard to comment on details of the code without the code and if the code runs too long, it is hard to go over it line by line and compare to the paper. Perhaps you have done some preliminary "debugging" yourself and you would require some help with a particular part? I think that would be a more efficient question in terms of getting help. – A_A Nov 23 '17 at 14:23
• Thank you for editing my question. I have done some debugging of my own but since I'm not very familiar with adaptive filters I can't seem to pinpoint the source of the mentioned issue. I will post the part of the code corresponding to the filter because I think that is where the problem is. Thank you again for your reply. – Elias C Nov 24 '17 at 3:03
• I just tried to run my code for more iterations and the result was very good. I guess it was a question of fine tuning the parameters to get the result I wanted. Anyway, thank you very much for helping out. – Elias C Nov 24 '17 at 4:37
• Hey @RoG I posted a link for the code below, it's been a while now but still I hope it helps. – Elias C Mar 18 '19 at 0:35
• @RoG I added the rir filter I used in the edited post below hope it helps. – Elias C Mar 21 '19 at 4:12

As was advised to me by A_A in the comment section I will close this thread with a "self-answer". The code present in the question is a code for a speech signal de-reverberation adaptive filter based on the Kurtosis signal of the signal's Lp residual. The original idea isn't mine (the reference is in the question). But the problem I faced was mainly due to the fact that my sensor did not convert to the desired result. I drastically increased the number of iterations the adaptive filter does and the result converged.(from n=500 to n=2000) There are others parameters that can be tweaked too (like mu) but I haven't had the time recently to thoroughly evaluate their effects.