Hi,
0.1Hz is still a *big* difference. It means the transmitted and received
samples are still sliding quite rapidly with respect to each other, and
that means the adaption is proceeding too fast to ever catch up and
eliminate all the echo. Ideally you need to eliminate all the frequency
mismatch, but you certainly need to get so close to that goal that the
creep rate is well within the capability of the adaption to keep up.
Note that a one off measurement of the frequency difference is not
ideal. The DAC and ADC sample rates will change with temperature, and
not necessarily in the same direction.
Steve
On 09/30/2010 04:45 PM, LiMaoquan2000 wrote:>
> Hi All,
>
> In order to deal with acoustic echo cancellation problems of most PCs
> which
> sound cards have different capture and play frequencies. I made a trial.
>
> At first, a 1000Hz sine wave is played for a long time via a speaker
> and its
> acoustic echo is recoreded.
>
> Seconds, get the frequency of the echo by a FFT analyser. So the
> difference
> between capture and play frequencies is obtained.
>
> Thirdly, before AEC, the signal captured by the soundcard is resampled
> to the
> play frequency. The frequency step of the resampler is 0.1Hz. So for
> the AEC,
> the difference between far-end signal and near-end signal is no more
> than 0.1Hz.
>
> I have tested the speex AEC and my own AEC in a PC that the difference
> between
> its sound card is about 0.8Hz. They show the same result :
>
> WITHOUT the resampler, just a little acoustic echo is eliminated.
> WITH the resampler, most acoustic echo is eliminated. But it still can
> be heared
> clearly, even though the echo is faint.
>
> This performance is still much worse than AEC in PCs which sound cards
> have same
> capture and play frequencies. There is almost no echo can be heard in
> latter.
>
> Does anybody have advices to this problem? It's a common problem for
> acoustic
> echo cancellation in most computers, because most sound cards have
> different
> capture and play frequencies. It vital for all acoustic echo cancellers.
>
> Any advice is welcome.
>
> ----------------------------------------------------------------------
>
> >Date: Sun, 25 Jul 2010 20:26:44 +0000 (GMT)
> >From: p_j_r_m <p_j_r_m at yahoo.com <mailto:p_j_r_m at
yahoo.com>>
> >Subject: Re: [Speex-dev] Sound card problem in acoustic echo
> >To: speex-dev at xiph.org <mailto:speex-dev at xiph.org>
> >
> >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.
> >
> >--- El vie, 23/7/10, limaoquan2000 <limaoquan2000 at 126.com
> <mailto:limaoquan2000 at 126.com>> escribi?:
> >
> >
> >De: limaoquan2000 <limaoquan2000 at 126.com <mailto:limaoquan2000
at 126.com>>
> >Asunto: Re: [Speex-dev] Sound card problem in acoustic echo
> >Para: speex-dev at xiph.org <mailto:speex-dev at xiph.org>,
> p_j_r_m at yahoo.com <mailto:p_j_r_m at yahoo.com>
> >Fecha: viernes, 23 de julio, 2010 22:42
> >
> >
> >>I remember?I had to expose the echo cancelation level implementing
a
> get_echo_level( ) function based on this:
>
>>http://lists.xiph.org/pipermail/speex-dev/2008-September/006889.html
> >
> >This is really a good idea to determine the frequency difference
> between capture
> >and play of the sound card. But it need constant far-end voice and a
> long time
> >because it must repeat the process of "resampling, test echo"
for
> many times.
> >
> >Have you tried the AEC in DirectSound? If this AEC is usable for all
> sound cards,
> >perhaps microsoft has solved this problem already. Can we choose
> proper options
> >of the DirectSound to solved this problem and disable its AEC at the
> same time?
> >
> >>
> >>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).
> >>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,
> >
> >>and now,i would dive first in DirectSound to try to obtain
> synchronized streams before passing them to speex.
> >
> >Waiting for your good news.
> >
> >>Regarding ASIO, you have to install a special "driver"?
for it to
> work,and this seems unaceptable for general users.
> >
> >>--- El jue, 22/7/10, limaoquan2000 <limaoquan2000 at 126.com
> <mailto:limaoquan2000 at 126.com>> escribi:
> >
> >>Thank you.
> >
> >>But it will cost you a long time to get the accurate play and
> capture frequencies.
> >>Does your program test two frequencies of the sound card each time
> Because
> >>different sound cards have different frequency errors.
> >>And the resampling program is also time consuming because the
target
> frequency is
> >>so close to the sampling frequency of the input signal, isn't
it?
> >
> >>I have tested program based on Windows waveform functions and also
> DirectSound.
> >>They have similar frequency error.
> >
> >>BTW: What's your conclusion of ASIO driver? Why "it was of
no
> practical use"?
> >
> >>> 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.
>
>
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev