<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><font class="Apple-style-span" size="2"><span style="font-family: arial, helvetica, sans-serif; ">Yeah I tried to do a drop-in replacement for the speex echo stuff as a comparison test but my results were poor... haven't had time to research why yet, I'm guessing I did something wrong. &nbsp;Perhaps my total lack of understanding of the bands nearendH/outH or what I'm supposed to do with skew (how would I know that?). &nbsp;It's also not clear I have interfaced at the right layer. &nbsp;For those interested:</span><br><br></font></div><div><font class="Apple-style-span" size="2">initialization:</font></div><div><font class="Apple-style-span" size="2"><br></font></div><div><font class="Apple-style-span" size="2">#ifdef ECHO_SPEEX<br></font></div><div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span"
 style="white-space:pre">        </span>if ( (&nbsp;echoCancellationState = speex_echo_state_init( stageSamples, 24 * stageSamples ) ) ) {<span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">                </span>speex_echo_ctl( (struct SpeexEchoState_*)echoCancellationState, SPEEX_ECHO_SET_SAMPLING_RATE, &amp;samplesPerSecond );</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div><font class="Apple-style-span" size="2">#endif</font></div><div><font class="Apple-style-span" size="2">#ifdef ECHO_WEBRTC</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>if ( 0 == WebRtcAec_Create( &amp;echoCancellationState ) ) {</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span"
 style="white-space:pre">                </span>WebRtcAec_Init( echoCancellationState, samplesPerSecond, samplesPerSecond );</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div><font class="Apple-style-span" size="2">#endif</font></div><div><font class="Apple-style-span" size="2"><br></font></div></div><div><font class="Apple-style-span" size="2"><br></font></div><div><font class="Apple-style-span" size="2">cancellation:</font></div><div><font class="Apple-style-span" size="2"><br></font></div><div><div><font class="Apple-style-span" size="2">#ifdef ECHO_SPEEX</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>speex_echo_cancellation( (struct SpeexEchoState_*)echoCancellationState, (const spx_int16_t*)stageProduced, (const spx_int16_t*)playedBuffer-&gt;data, (spx_int16_t*)stageProduced );</font></div><div><font
 class="Apple-style-span" size="2">#endif</font></div><div><font class="Apple-style-span" size="2">#ifdef ECHO_WEBRTC</font></div><div><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-tab-span" style="white-space:pre">        </span>WebRtcAec_BufferFarend( echoCancellationState, (WebRtc_Word16*)playedBuffer-&gt;data, stageBytes / 2 );</span><br></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space: pre; ">        </span>// yeah i realize this is completely inefficient but it's just a test and apparently i can't use the same buffer in+out here</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>unsigned char *c = new unsigned char[stageBytes];</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>memcpy( c, stageProduced, stageBytes );</font></div><div><font
 class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>WebRtcAec_Process( echoCancellationState, (WebRtc_Word16*)c, 0, (WebRtc_Word16*)stageProduced, 0, stageBytes / 2, 0, 0 );</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>delete [] c;</font></div><div><font class="Apple-style-span" size="2">#endif</font></div><div><font class="Apple-style-span" size="2"><br></font></div><div><font class="Apple-style-span" size="2"><br></font></div></div><div><font class="Apple-style-span" size="2">destruction:<br><br></font></div><div><div><font class="Apple-style-span" size="2">#ifdef ECHO_SPEEX</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>speex_echo_state_destroy( (struct SpeexEchoState_*)echoCancellationState );</font></div><div><font class="Apple-style-span"
 size="2">#endif</font></div><div><font class="Apple-style-span" size="2">#ifdef ECHO_WEBRTC</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>WebRtcAec_Free( echoCancellationState );</font></div><div><font class="Apple-style-span" size="2">#endif</font></div><div><font class="Apple-style-span" size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>echoCancellationState = 0;</font></div><div><br></div></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><span><br></span></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Steve Underwood
 &lt;steveu@coppice.org&gt;<br><b><span style="font-weight: bold;">To:</span></b> Steve Kann &lt;stevek@stevek.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> speex-dev@xiph.org<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, June 22, 2011 9:08 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Speex-dev] Acoustic echo cancellation<br></font><br>
On 06/22/2011 09:30 AM, Steve Kann wrote:<br>&gt; Speaking of AEC (thought not quite on topic for this thread),<br>&gt;<br>&gt; Has anyone on this list played with the GIPS code that google just <br>&gt; open-sourced? It looks like their AEC also has code to handle <br>&gt; differential sample rates, though I haven't really evaluated it <br>&gt; thoroughly.<br>&gt;<br>&gt; There is really a lot of code in the drop — basically all of the GIPS <br>&gt; DSP stuff (AGC, VAD, Denoise, echo canceller, etc), their transport <br>&gt; layer, hardware access (audio/video capture), etc. It's all wrapped up <br>&gt; to be part of a javascript API in the browser, but it seems like the <br>&gt; individual components are useable without the rest.<br>&gt;<br>&gt; <a href="https://sites.google.com/site/webrtc/" target="_blank">https://sites.google.com/site/webrtc/</a><br>&gt;<br>&gt; -SteveK<br>&gt;<br>As I said last week on this very list....
 yes.<br><br>Steve<br><br>_______________________________________________<br>Speex-dev mailing list<br><a ymailto="mailto:Speex-dev@xiph.org" href="mailto:Speex-dev@xiph.org">Speex-dev@xiph.org</a><br>http://lists.xiph.org/mailman/listinfo/speex-dev<br><br><br></div></div></div></body></html>