<!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};                                                                         OL, UL{margin-Top: 0px; margin-Bottom: 0px};                                                                         p{margin-Top:0em; margin-Bottom:0px; padding:0px;};                                                                         body{FONT-SIZE:12pt; FONT-FAMILY:宋体,serif;};                                                                         </STYLE>
<META name=GENERATOR content="MSHTML 9.00.8112.16421"><BASE
target=_blank></HEAD>
<BODY
style="LINE-HEIGHT: 1.3; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px"
marginheight="0" marginwidth="0">
<P>> Hi, <BR>> <BR>> I have a scenario in a mobile VoIP app that
requires echo cancellation but <BR>> is somewhat different from what's
described in the docs. <BR>> <BR>> Audio is received from and sent to the
network at 8000Hz. Each packet <BR>> contains 160 samples worth a playback of
20ms. <BR>> <BR>> But the hardware requires aggregation for both playback
and capture. So for <BR>> playback, I coalesce 4 packets in a buffer and
queue them as a larger buffer <BR>> for playback. <BR>> On the send side,
I read a large buffer (worth 4 packets) and send them out <BR>> over time
20ms apart. <BR>> <BR>> I tried using speex_echo_playback just when a
160-sample packet arrives from <BR>> the network, before coalescing and
speex_echo_capture just before a packet <BR>> is sent out to the network but
that doesn't seem to work properly (doesn't <BR>> cancel any echo). </P>
<P> </P>
<P>The most likely reason is that you didn't align the far-end and near-end
samples.</P>
<P>So the filter can not converge.</P>
<P> </P>
<P>> So, in this scenario above, please recommend a good place to insert
<BR>> speex_echo_playback and speex_echo_capture. Should I be just before the
read <BR>> and write to hardware? In that case, should I use a larger "frame
size" of <BR>> 160 samples x 4? </P>
<P> </P>
<P>Of course you can set frame size to 160*4. Otherwise you can feed samples 4
times<BR>to the AEC if you don't want to modify the frame size.</P>
<P> </P>
<P>> <BR>> Thanks in advance, <BR>> Daniel. <BR></P></BODY></HTML>