<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css> <!--@import url(E:\LMQ\LightingMail\\data\scrollbar.css); --></STYLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE>BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em};                                                  body{FONT-SIZE:12pt; FONT-FAMILY:宋体,serif;};                                                  </STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.18943"><BASE
target=_blank></HEAD>
<BODY
style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"
marginheight="0" marginwidth="0">
<P>Hi All,</P>
<P>In order to deal with acoustic echo cancellation problems of most PCs
which<BR>sound cards have different capture and play frequencies. I made a
trial.</P>
<P>At first, a 1000Hz sine wave is played for a long time via a speaker and
its<BR>acoustic echo is recoreded.</P>
<P>Seconds, get the frequency of the echo by a FFT analyser. So the
difference<BR>between capture and play frequencies is obtained.</P>
<P>Thirdly, before AEC, the signal captured by the soundcard is resampled to
the<BR>play frequency. The frequency step of the resampler is 0.1Hz. So for the
AEC,<BR>the difference between far-end signal and near-end signal is no more
than 0.1Hz.</P>
<P>I have tested the speex AEC and my own AEC in a PC that the difference
between<BR>its sound card is about 0.8Hz. They show the same result :</P>
<P>WITHOUT the resampler, just a little acoustic echo is eliminated.<BR>WITH the
resampler, most acoustic echo is eliminated. But it still can be
heared<BR>clearly, even though the echo is faint.</P>
<P>This performance is still much worse than AEC in PCs which sound cards have
same<BR>capture and play frequencies. There is almost no echo can be heard in
latter.</P>
<P>Does anybody have advices to this problem? It's a common problem for
acoustic<BR>echo cancellation in most computers, because most sound cards have
different<BR> capture and play frequencies. It vital for all acoustic echo
cancellers.</P>
<P>Any advice is welcome.</P>
<P>----------------------------------------------------------------------</P>
<P>>Date: Sun, 25 Jul 2010 20:26:44 +0000 (GMT)<BR>>From: p_j_r_m <<A
href="mailto:p_j_r_m@yahoo.com">p_j_r_m@yahoo.com</A>><BR>>Subject: Re:
[Speex-dev] Sound card problem in acoustic echo<BR>>To: <A
href="mailto:speex-dev@xiph.org">speex-dev@xiph.org</A><BR>><BR>>Direct
Sound AEC never worked for me, even when it did with Speex.?I was told that
after disabling effects in DS the play and record streams could be
synchronized,and then Speex AEC did the job.<BR>><BR>>--- El vie, 23/7/10,
limaoquan2000 <<A
href="mailto:limaoquan2000@126.com">limaoquan2000@126.com</A>>
escribi?:<BR>><BR>><BR>>De: limaoquan2000 <<A
href="mailto:limaoquan2000@126.com">limaoquan2000@126.com</A>><BR>>Asunto:
Re: [Speex-dev] Sound card problem in acoustic echo<BR>>Para: <A
href="mailto:speex-dev@xiph.org">speex-dev@xiph.org</A>, <A
href="mailto:p_j_r_m@yahoo.com">p_j_r_m@yahoo.com</A><BR>>Fecha: viernes, 23
de julio, 2010 22:42<BR>><BR>><BR>>>I remember?I had to expose the
echo cancelation level implementing a get_echo_level( ) function based on
this:<BR>>>http://lists.xiph.org/pipermail/speex-dev/2008-September/006889.html<BR>><BR>>This
is really a good idea to determine the frequency difference between
capture<BR>>and play of the sound card. But it need constant far-end voice
and a long time<BR>>because it must repeat the process of "resampling, test
echo" for many times.<BR>><BR>>Have you tried the AEC in DirectSound? If
this AEC is usable for all sound cards,<BR>>perhaps microsoft has solved this
problem already. Can we choose proper options<BR>>of the DirectSound to
solved this problem and disable its AEC at the same
time?<BR>><BR>>><BR>>>Using that value and averaging samples
as?"fedback" I did small corrections to sampling rate until convergence,
although this not always worked.When it did, convergence was quite fast
(seconds).<BR>>>Resampling did not introduce noticiable CPU increase.But
may be the small time used for conversions was the cause of non-convergence.I
think this path is hard and uncertain,<BR>><BR>>>and now,i would dive
first in DirectSound to try to obtain synchronized streams before passing them
to speex.<BR>><BR>>Waiting for your good
news.<BR>><BR>>>Regarding ASIO, you have to install a special "driver"?
for it to work,and this seems unaceptable for general
users.<BR>><BR>>>--- El jue, 22/7/10, limaoquan2000 <<A
href="mailto:limaoquan2000@126.com">limaoquan2000@126.com</A>>
escribi:<BR>><BR>>>Thank you.<BR>><BR>>>But it will cost you a
long time to get the accurate play and capture frequencies.<BR>>>Does your
program test two frequencies of the sound card each time
Because<BR>>>different sound cards have different frequency
errors.<BR>>>And the resampling program is also time consuming because the
target frequency is<BR>>>so close to the sampling frequency of the input
signal, isn't it?<BR>><BR>>>I have tested program based on Windows
waveform functions and also DirectSound.<BR>>>They have similar frequency
error.<BR>><BR>>>BTW: What's your conclusion of ASIO driver? Why "it
was of no practical use"?<BR>><BR>>>> 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.<BR>>>> Also, I tried the ASIO driver,as an
experiment. I think it worked, but it was of no practical
use.<BR></P></BODY></HTML>