[Speex-dev] Sound card problem in acoustic echo

p_j_r_m p_j_r_m at yahoo.com
Wed Jul 21 14:02:00 PDT 2010


I worked some time for a company doing AEC using Speex on Windows.It is true it depends a lot on sound card models. I remember I could do AEC by resampling frequencies so play and record frequencies where equal.Frequencies where aprox 100Hz appart.Also, I know that on other cases AEC was achieved by disabling FX DirectSound effects where it wasn`t possible before that.Try to disable all you don´t need before calling Speex AEC function.
Also, I tried the ASIO driver,as an experiment. I think it worked, but it was of no practical use.
 
 
--- El mar, 20/7/10, limaoquan2000 <limaoquan2000 at 126.com> escribió:


De: limaoquan2000 <limaoquan2000 at 126.com>
Asunto: Re: [Speex-dev] Sound card problem in acoustic echo
Para: speex-dev at xiph.org
Fecha: martes, 20 de julio, 2010 10:27


Hi all,

The conclusion of the discussion is that most sound cards indeed have
different capture and playing frequencies for the unknown reasons.
But we all know the adaptive filter of the AEC relies on the synchronization
of the far-end and near-end sampling rates.

Then Has anybody tried to use speex AEC in Windows system? How do you
solve this problem?
(I have tested speex AEC. In most computers, it has poor echo cancelltion
effect. Of course, the sound cards of these computers have different capture
and playing frequencies.)

But why MSN and Skype exhibit almost perfect echo cancelltion effect in
the same computers? 
What should we do to use AEC in most computers?
(Don't tell me to change a sound card.)

>>
>> From: Steve Underwood <steveu at coppice.org <mailto:steveu at coppice.org>>
>>
>> > It seems some cards use a PLL for their ADC, so they can lock to an
>> > incoming SPDIF signal, but always use a local crystal clock source for
>> > their DAC. These cards do not have their ADC and DAC synchronised.
>>
>> Do common on-board or PCI sound card lock to some incoming signal?
>>
>I already said they do, and what the lock to - SPDIF ports. Most modern 
>machines have one, and if they don't its generally still there in the 
>chipset, and there is simply no socket provided.
>>
>> Yes, there is a crystal oscillator and a PLL or divider to generate
>> assigned clock signal. But if playing and capture are assigned the
>> same sampling rate, why clock of ADC and DAC are not synchronised?
>>
>There seems no good reason why the DAC rate should not be synchronised 
>to the ADC rate. In reality, this frequently doesn't happen.
>>
>> 1. If it is a pure hardware sound card (no incoming SPDIF signal).
>> Why not send ONE clock signal to ADC and DAC?
>>
>Because the ADC always runs from the same PLL source, presumably for 
>simplicity.
>>
>> 2. if it is a AC97 or HD sound card, clock frequencies of their hardware
>> ADC and DAC are all fixed to 48/196KHz. Then why their are still not
>> synchronised?
>>
>Not really. They are *approx* 48kHz or *approx* 192kHz.
>>
>> > It seems like Skype's speakerphone works OK on these machines, so maybe
>> > they do something tricky to measure the slip rate and resynchronise in
>> > software. On the other hand, they might just fall back to a crude echo
>> > suppression scheme. Skype seems to do a reasonable job, though.
>>
>> It is difficulty to measure the accurate difference between two sampling
>> rate by a software in a short time. So I don't believe Skype do some kind
>> of resynchronise or re-sampling work.
>>
>They have plenty of time. It is possible to do the necessary resync 
>*provided* the PLL doesn't drift around too much when it is not being 
>driven by a proper source. Concern about that point might make them 
>avoid it completely.
>>
>> From: Guilherme Balena Versiani <guibv at comunip.com.br 
>> <mailto:guibv at comunip.com.br>>
>>
>> > Yeah, the ADC and DAC work at different rates. I really don't know 
>> why these
>> > soundcards are designed this way, but I can tell you that this is very
>> > common. In fact, I didn't ever find a soundcard with the same 
>> capture and
>> > render rates.
>>
>> If it is very common. I have tested more than 20 sound cards. Only 2 
>> sound cards
>> have exactly the same capture and render rates.
>>
>> > If you want to sinchronize capture and render parts, you need to 
>> implement a
>> > kind of buffer control, referenced as "skew control" (check it out). 
>> There
>> > is a very common control that removes or increases the delay when 
>> there is
>> > not enough energy on the output stream (i.e. the voice being 
>> acquired by the
>> > microphone).
>>
>> Sorry, I don't think so. It will cause sudden change of the echo delay 
>> which
>> is harmful to the adaptive filter of AEC.
>>
>> > But these kind of controls seem to put AEC of Speex crazy... When 
>> the skew
>> > control occurs, normally the AEC stops to work fine.
>>
>> Yes, of course.
>>
>>
>It is quite possible that most hardware actually has the ability to 
>select clocking arrangements that will ensure the ADC and DAC operate in 
>lock step. Maybe the facility just isn't exposed in a usable way. In the 
>end the reasons don't matter all the much. You have to live with what 
>you get.

>Steve




您想拥有和网易免费邮箱一样强大的软件吗? 
-----Adjunto en línea a continuación-----


_______________________________________________
Speex-dev mailing list
Speex-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20100721/5795b2b7/attachment.htm 


More information about the Speex-dev mailing list