1
$\begingroup$

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

enter image description here

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – A_A Nov 23 '17 at 14:23
  • $\begingroup$ 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. $\endgroup$ – Elias C Nov 24 '17 at 3:03
  • $\begingroup$ 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. $\endgroup$ – Elias C Nov 24 '17 at 4:37
  • 1
    $\begingroup$ Hey @RoG I posted a link for the code below, it's been a while now but still I hope it helps. $\endgroup$ – Elias C Mar 18 at 0:35
  • 1
    $\begingroup$ @RoG I added the rir filter I used in the edited post below hope it helps. $\endgroup$ – Elias C Mar 21 at 4:12
1
$\begingroup$

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.

Here's a link to download the code hope it helps. (expires by April 18th)

Code download link

Here's the link for the RIR code I used, I did not write the code though. I downloaded the file from matlab file exchange. The original author is Stephen G. McGovern, he also wrote a paper with the theoretical explanations for the RIR filter.

RIR code

$\endgroup$
  • $\begingroup$ The link to the code is expired. Can you please upload a new link? Thank you $\endgroup$ – user45305 Sep 24 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.