[asterisk-users] The High Performance Echo Canceller (HPEC)

Nic Bellamy nicb-lists at vadacom.co.nz
Thu Feb 15 16:11:35 MST 2007


Dean Collins wrote:
> How do you fake echo for testing purposes then?
>   
All my tests have been done using sound files in userspace - I've 
written a few bits of code for doing this.

Basically, the idea is you start with two sound files - speaker-A and 
speaker-B. Take speaker-A file, and run it through a finite impulse 
response filter (FIR) that has been preloaded with an "echo path" (ie. 
line echo characteristics). I use the various echo path models from the 
ITU G.168 specification for this, set at various "pure delay" offsets, 
and sometimes mixed together (ie. multiple paths at different offsets 
and amplitudes to simulate a variety of really nasty echo paths). The 
output is the speaker-A returned echo, and is saved to a file, then 
mixed with speaker-B so as to simulate doubletalk scenarios - resulting 
file called "speaker-A-rx".

My other tools wrap the various Zaptel echo cancellers into a userspace 
program, read  .wav files of speaker-A and speaker-A-rx, run the echo 
canceller over them, and save the echo cancelled output to another file, 
which can then be listened to, spectrum analysed, etc.

Testing the HPEC stuff was a bit more complicated, since it's a binary 
blob that requires licensing - I whacked up a quick'n'dirty Zaptel ioctl 
that takes bits of audio, feeds it through it, and passes it back, and 
uses rdtsc to keep track of CPU time used.

Cheers,
    Nic.
>   
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
>> bounces at lists.digium.com] On Behalf Of Nic Bellamy
>> Sent: Thursday, 15 February 2007 3:53 PM
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> Subject: Re: [asterisk-users] The High Performance Echo Canceller
>>     
> (HPEC)
>   
>> Wireless wrote:
>>     
>>> Does anyone know if the HPEC will work on a Sangoma A200 / 2 port
>>>       
> FXO card?
>   
>>> (I'm assuming so as it still uses Zapel)  I've 2 PSTN lines one of
>>>       
> which I
>   
>>> cannot get rid of the echo, I've tried a 2GHz machine as apposed to
>>>       
> my
>   
>>> normal P3 650MHz and this made no difference. Would the 650Mhz be
>>>       
> enough
>   
>> to
>>     
>>> run HPEC on one line (I assume only needing one licence)
>>>
>>>       
>> It should work, providing all the Wanpipe stuff is ready to work with
>> Zaptel 1.2.13.
>>
>> As far as performance, you should be able to get one, maybe two
>>     
> channels
>   
>> of 1024 tap cancellation on the P3, but I'd advise careful testing,
>> perhaps even using oprofile for a while to keep an eye on what's using
>>     
> what.
>   
>> You also have to watch out extra carefully due to the following: HPEC
>> works in "sparse" mode, meaning it can cover 1024 taps, but just
>>     
> cancels
>   
>> echo in the parts where there is echo - hence CPU usage will likely
>> change quite a bit with different echo paths - ie. a simple single
>> reflection path will use less CPU than a complicated path with more
>>     
> than
>   
>> one reflection.
>>
>> Cheers,
>>     Nic.
>>
>> --
>> Nic Bellamy,
>> Head Of Engineering, Vadacom Ltd - http://www.vadacom.co.nz/
>>
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>     
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>   


-- 
Nic Bellamy,
Head Of Engineering, Vadacom Ltd - http://www.vadacom.co.nz/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070215/0bc2e651/attachment.htm


More information about the asterisk-users mailing list