[Asterisk-Users] Terrible echo with Te110P and Adit 600
Kris Boutilier
Kris.Boutilier at scrd.bc.ca
Mon Oct 24 17:09:27 MST 2005
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> bounces at lists.digium.com] On Behalf Of steve at daviesfam.org
> Sent: Monday, October 24, 2005 12:07 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Terrible echo with Te110P and Adit 600
>
> On Sun, 23 Oct 2005, C F wrote:
>
> > Why?
> >
> > On 10/23/05, Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com>
wrote:
> > > On Sunday 23 October 2005 18:02, C F wrote:
> > > > Sorry guys I forgot to mention that in my setup I always enable
> > > > agressive in zconfig
> > >
> > > Yuck. I find the agressive echo canceller totally unacceptable.
>
>
> Did you listen to the aggressive suppressor working? Every time you
> speak, the other end of the line gets muted "dead".
>
>From the source code for the echo canceller (slightly reformatted):
#ifdef AGGRESSIVE_SUPPRESSOR
if ((ec->HCNTR_d < AGGRESSIVE_HCNTR) && (ec->Ly_i > (ec->Lu_i << 1))) {
for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) {
u = u * (ec->Lu_i >> DEFAULT_SIGMA_LU_I)
/ ((ec->Ly_i >> (DEFAULT_SIGMA_LY_I)) + 1);
}
}
#else
if (ec->HCNTR_d == 0) {
if ((ec->Ly_i/(ec->Lu_i + 1)) > DEFAULT_SUPPR_I) {
for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) {
u = u * (ec->Lu_i >> DEFAULT_SIGMA_LU_I)
/ ((ec->Ly_i >> (DEFAULT_SIGMA_LY_I + 2)) + 1);
}
}
}
Put another way, when the aggressive canceller is swapped in, a two
interesting things happen:
- The echo canceller begins to be able to subtract again
AGGRESSIVE_HCNTR samples _before_ the doubletalk detection timer has
completely expired, ie. when (ec->HCNTR_d < AGGRESSIVE_HCNTR), and it is
only subtracted from each sample so long as the average signal level
exceeds the energy level of this particular sample, ie. (ec->Ly_i >
(ec->Lu_i << 1)). Put another way, this seems to say to me, 'there might
be the tail end of some far end speech going on, so lets start canceling
again, at the risk of some limited distortion of the far end talkers
voice. Also, if the frame is quieter than most then it needs to be
canceled.'
- The magnitude of the theoretical echo component is artificially
increased before being subtracted from the returning signal. ie.
(DEFAULT_SIGMA_LY_I + 2)
Likely the latter causes the acoustical 'deadness'. It would be an
interesting academic exercise to replace (DEFAULT_SIGMA_LY_I + 2) with
the original (DEFAULT_SIGMA_LY_I), recompile and see if you still get
superior echo cancellation performance but with a more acceptable
acoustical response.
However, if anyone has better/more correct interpretations of aggressive
suppression please do enlighten me. :-)
Also, if you're not already, try using the kb1 echo canceller from
CVS-HEAD without aggressive cancellation before taking time to do any of
the above. It can be dropped into stable if needed by just copying it
(and the contents of the header file) over the top of the mec2 files.
Hope that helps.
Kris Boutilier
Information Services Coordinator
Sunshine Coast Regional District
More information about the asterisk-users
mailing list