Coffey, Michael
2007-Jun-26 17:27 UTC
[Speex-dev] Residual Echo Suppression by the Preprocessor
What is the current status of the residual echo suppressor in the preprocessor? I ask this because I have occasional problems with the AEC, in which it fails to cancel echo. I think the problems have to do with samples being dropped by the audio IO system, which is effectively impossible to detect and counteract reliably. A colleague recommended using an echo suppression technique (which he meant as synonymous with "nonlinear processor" and "loss control"). I wouldn't want the program to do anything drastic unless it knows that cancellation is not working. I'll probably just try it out and see how it works. Still, I figure it's a good idea to ask what the known problems are, in case there are any. BTW, just to check my understanding... Do I need only the following initialization code (along with my already-working code that calls the AEC and preprocessor) to get the echo suppressor working? (Some declarations omitted, to save labor.) // m_EchoState = speex_echo_state_init( ... ); // m_PreProc = speex_preprocess_state_init( ... ); speex_preprocess_ctl( m_PreProc, SPEEX_PREPROCESS_SET_ECHO_STATE, m_EchoState ); //optional: INT32 maxEchoAttenuationDB = -40; //use negative; default is -40 speex_preprocess_ctl( m_PreProc, PREPROCESS_SET_ECHO_SUPPRESS, &maxEchoAttenuationDB ); INT32 maxNearEndEchoAttenuationDB = -15; //use negative; default is -15 speex_preprocess_ctl( m_PreProc, SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE, & maxNearEndEchoAttenuationDB); Oh, I've been turning the noise suppressor on, as well, although some of our users don't like some of the artifacts. My processing code passes the main output of the echo canceller to the preprocessor, of course, and also the echo residuals, as the manual says. I'd assume those residuals are important for the echo suppressor, too. speex_echo_cancel( m_EchoState, &micSamples, &speakerSamples , &output, &m_Noise ); speex_preprocess( m_PreProc, &output, &m_Noise); Thanks
Jean-Marc Valin
2007-Jun-26 20:49 UTC
[Speex-dev] Residual Echo Suppression by the Preprocessor
The residual echo suppression is supposed to be working decently well now. However, it's not designed to counter the effects of samples being dropped off the soundcard. You'll just need to fix that problem for real. Jean-Marc Coffey, Michael a ?crit :> What is the current status of the residual echo suppressor in the > preprocessor? > > I ask this because I have occasional problems with the AEC, in which it > fails to cancel echo. I think the problems have to do with samples being > dropped by the audio IO system, which is effectively impossible to > detect and counteract reliably. > > A colleague recommended using an echo suppression technique (which he > meant as synonymous with "nonlinear processor" and "loss control"). I > wouldn't want the program to do anything drastic unless it knows that > cancellation is not working. > > I'll probably just try it out and see how it works. Still, I figure it's > a good idea to ask what the known problems are, in case there are any. > > BTW, just to check my understanding... Do I need only the following > initialization code (along with my already-working code that calls the > AEC and preprocessor) to get the echo suppressor working? (Some > declarations omitted, to save labor.) > > > // m_EchoState = speex_echo_state_init( ... ); > > // m_PreProc = speex_preprocess_state_init( ... ); > > speex_preprocess_ctl( > m_PreProc, SPEEX_PREPROCESS_SET_ECHO_STATE, m_EchoState ); > > //optional: > INT32 maxEchoAttenuationDB = -40; //use negative; default is -40 > speex_preprocess_ctl( > m_PreProc, PREPROCESS_SET_ECHO_SUPPRESS, &maxEchoAttenuationDB > ); > > INT32 maxNearEndEchoAttenuationDB = -15; //use negative; default is > -15 > speex_preprocess_ctl( > m_PreProc, SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE, > & maxNearEndEchoAttenuationDB); > > Oh, I've been turning the noise suppressor on, as well, although some of > our users don't like some of the artifacts. > > My processing code passes the main output of the echo canceller to the > preprocessor, of course, and also the echo residuals, as the manual > says. I'd assume those residuals are important for the echo suppressor, > too. > > speex_echo_cancel( m_EchoState, &micSamples, &speakerSamples > , &output, &m_Noise ); > speex_preprocess( m_PreProc, &output, &m_Noise); > > Thanks > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >
I realize that the preprocessor echo suppression is not designed specifically to counter the effects of data loss. On the other hand, as much as I might like to, I do not have the option to "fix that problem for real." The sad truth is that some end users have systems that may drop samples, or do other unfathomable things, no matter what I do. I can not rewrite their drivers, firmware, or operating system. My job is to do the best I can in a difficult situation. At this point, the echo canceller seems to work well on literally 90% of the machines I have tested. I am trying to put together a "backup" strategy to cover the cases where it does not work. I might eventually settle for detecting non-convergence and enforcing half-duplex in that case, but I'd like to better than that if I can. I initially assumed that the echo suppressor is similar to other echo suppressors (also called "nonlinear processors" or "loss controls"). Those suppressors use cruder algorithms that exhibit artifacts but that may not depend on the fine time structure of the audio signals. Is this not true of the preprocessor echo suppressor? -mjc -----Original Message----- From: Jean-Marc Valin [mailto:jean-marc.valin@usherbrooke.ca] Sent: Tuesday, June 26, 2007 8:49 PM To: Coffey, Michael Cc: speex-dev@xiph.org Subject: Re: [Speex-dev] Residual Echo Suppression by the Preprocessor The residual echo suppression is supposed to be working decently well now. However, it's not designed to counter the effects of samples being dropped off the soundcard. You'll just need to fix that problem for real. Jean-Marc