<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>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.</DIV>
<DIV>Also, I tried the ASIO driver,as an experiment. I think it worked, but it was of no practical use.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>--- El <B>mar, 20/7/10, limaoquan2000 <I><limaoquan2000@126.com></I></B> escribió:<BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>De: limaoquan2000 <limaoquan2000@126.com><BR>Asunto: Re: [Speex-dev] Sound card problem in acoustic echo<BR>Para: speex-dev@xiph.org<BR>Fecha: martes, 20 de julio, 2010 10:27<BR><BR>
<DIV id=yiv1087619391>Hi all,<BR><BR>The conclusion of the discussion is that most sound cards indeed have<BR>different capture and playing frequencies for the unknown reasons.<BR>But we all know the adaptive filter of the AEC relies on the synchronization<BR>of the far-end and near-end sampling rates.<BR><BR>Then Has anybody tried to use speex AEC in Windows system? How do you<BR>solve this problem?<BR>(I have tested speex AEC. In most computers, it has poor echo cancelltion<BR>effect. Of course, the sound cards of these computers have different capture<BR>and playing frequencies.)<BR><BR>But why MSN and Skype exhibit almost perfect echo cancelltion effect in<BR>the same computers? <BR>What should we do to use AEC in most computers?<BR>(Don't tell me to change a sound card.)<BR><BR>>><BR>>> From: Steve Underwood <steveu@coppice.org <mailto:steveu@coppice.org>><BR>>><BR>>> > It seems some cards use a PLL for their
ADC, so they can lock to an<BR>>> > incoming SPDIF signal, but always use a local crystal clock source for<BR>>> > their DAC. These cards do not have their ADC and DAC synchronised.<BR>>><BR>>> Do common on-board or PCI sound card lock to some incoming signal?<BR>>><BR>>I already said they do, and what the lock to - SPDIF ports. Most modern <BR>>machines have one, and if they don't its generally still there in the <BR>>chipset, and there is simply no socket provided.<BR>>><BR>>> Yes, there is a crystal oscillator and a PLL or divider to generate<BR>>> assigned clock signal. But if playing and capture are assigned the<BR>>> same sampling rate, why clock of ADC and DAC are not synchronised?<BR>>><BR>>There seems no good reason why the DAC rate should not be synchronised <BR>>to the ADC rate. In reality, this frequently doesn't happen.<BR>>><BR>>> 1. If it is a
pure hardware sound card (no incoming SPDIF signal).<BR>>> Why not send ONE clock signal to ADC and DAC?<BR>>><BR>>Because the ADC always runs from the same PLL source, presumably for <BR>>simplicity.<BR>>><BR>>> 2. if it is a AC97 or HD sound card, clock frequencies of their hardware<BR>>> ADC and DAC are all fixed to 48/196KHz. Then why their are still not<BR>>> synchronised?<BR>>><BR>>Not really. They are *approx* 48kHz or *approx* 192kHz.<BR>>><BR>>> > It seems like Skype's speakerphone works OK on these machines, so maybe<BR>>> > they do something tricky to measure the slip rate and resynchronise in<BR>>> > software. On the other hand, they might just fall back to a crude echo<BR>>> > suppression scheme. Skype seems to do a reasonable job, though.<BR>>><BR>>> It is difficulty to measure the accurate difference between two sampling<BR>>>
rate by a software in a short time. So I don't believe Skype do some kind<BR>>> of resynchronise or re-sampling work.<BR>>><BR>>They have plenty of time. It is possible to do the necessary resync <BR>>*provided* the PLL doesn't drift around too much when it is not being <BR>>driven by a proper source. Concern about that point might make them <BR>>avoid it completely.<BR>>><BR>>> From: Guilherme Balena Versiani <guibv@comunip.com.br <BR>>> <mailto:guibv@comunip.com.br>><BR>>><BR>>> > Yeah, the ADC and DAC work at different rates. I really don't know <BR>>> why these<BR>>> > soundcards are designed this way, but I can tell you that this is very<BR>>> > common. In fact, I didn't ever find a soundcard with the same <BR>>> capture and<BR>>> > render rates.<BR>>><BR>>> If it is very common. I have tested more than 20 sound cards. Only 2
<BR>>> sound cards<BR>>> have exactly the same capture and render rates.<BR>>><BR>>> > If you want to sinchronize capture and render parts, you need to <BR>>> implement a<BR>>> > kind of buffer control, referenced as "skew control" (check it out). <BR>>> There<BR>>> > is a very common control that removes or increases the delay when <BR>>> there is<BR>>> > not enough energy on the output stream (i.e. the voice being <BR>>> acquired by the<BR>>> > microphone).<BR>>><BR>>> Sorry, I don't think so. It will cause sudden change of the echo delay <BR>>> which<BR>>> is harmful to the adaptive filter of AEC.<BR>>><BR>>> > But these kind of controls seem to put AEC of Speex crazy... When <BR>>> the skew<BR>>> > control occurs, normally the AEC stops to work fine.<BR>>><BR>>> Yes, of
course.<BR>>><BR>>><BR>>It is quite possible that most hardware actually has the ability to <BR>>select clocking arrangements that will ensure the ADC and DAC operate in <BR>>lock step. Maybe the facility just isn't exposed in a usable way. In the <BR>>end the reasons don't matter all the much. You have to live with what <BR>>you get.<BR><BR>>Steve<BR><BR><BR><SPAN title=neteasefooter>
<HR>
<A href="http://qiye.163.com/?163" rel=nofollow target=_blank>您想拥有和网易免费邮箱一样强大的软件吗?</A> </SPAN></DIV><BR>-----Adjunto en línea a continuación-----<BR><BR>
<DIV class=plainMail>_______________________________________________<BR>Speex-dev mailing list<BR><A href="http://es.mc242.mail.yahoo.com/mc/compose?to=Speex-dev@xiph.org" ymailto="mailto:Speex-dev@xiph.org">Speex-dev@xiph.org</A><BR><A href="http://lists.xiph.org/mailman/listinfo/speex-dev" target=_blank>http://lists.xiph.org/mailman/listinfo/speex-dev</A><BR></DIV></BLOCKQUOTE></td></tr></table><br>