Re: Acoustic echo cancellation

Mark Pietras <[email protected]>
Newsgroups gmane.comp.audio.compression.speex.devel
Message-ID <[email protected]>
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.  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?).  It's also not clear I have interfaced at the right layer.  For those interested:


initialization:

#ifdef ECHO_SPEEX

if ( ( echoCancellationState = speex_echo_state_init( stageSamples, 24 * stageSamples ) ) ) {
speex_echo_ctl( (struct SpeexEchoState_*)echoCancellationState, SPEEX_ECHO_SET_SAMPLING_RATE, &samplesPerSecond );
}
#endif
#ifdef ECHO_WEBRTC
if ( 0 == WebRtcAec_Create( &echoCancellationState ) ) {
WebRtcAec_Init( echoCancellationState, samplesPerSecond, samplesPerSecond );
}
#endif


cancellation:

#ifdef ECHO_SPEEX
speex_echo_cancellation( (struct SpeexEchoState_*)echoCancellationState, (const spx_int16_t*)stageProduced, (const spx_int16_t*)playedBuffer->data, (spx_int16_t*)stageProduced );
#endif
#ifdef ECHO_WEBRTC
WebRtcAec_BufferFarend( echoCancellationState, (WebRtc_Word16*)playedBuffer->data, stageBytes / 2 );

// 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
unsigned char *c = new unsigned char[stageBytes];
memcpy( c, stageProduced, stageBytes );
WebRtcAec_Process( echoCancellationState, (WebRtc_Word16*)c, 0, (WebRtc_Word16*)stageProduced, 0, stageBytes / 2, 0, 0 );
delete [] c;
#endif


destruction:


#ifdef ECHO_SPEEX
speex_echo_state_destroy( (struct SpeexEchoState_*)echoCancellationState );
#endif
#ifdef ECHO_WEBRTC
WebRtcAec_Free( echoCancellationState );
#endif
echoCancellationState = 0;





________________________________
From: Steve Underwood <[email protected]>
To: Steve Kann <[email protected]>
Cc: [email protected]
Sent: Wednesday, June 22, 2011 9:08 AM
Subject: Re: [Speex-dev] Acoustic echo cancellation

On 06/22/2011 09:30 AM, Steve Kann wrote:
> Speaking of AEC (thought not quite on topic for this thread),
>
> Has anyone on this list played with the GIPS code that google just 
> open-sourced? It looks like their AEC also has code to handle 
> differential sample rates, though I haven't really evaluated it 
> thoroughly.
>
> There is really a lot of code in the drop — basically all of the GIPS 
> DSP stuff (AGC, VAD, Denoise, echo canceller, etc), their transport 
> layer, hardware access (audio/video capture), etc. It's all wrapped up 
> to be part of a javascript API in the browser, but it seems like the 
> individual components are useable without the rest.
>
> https://sites.google.com/site/webrtc/
>
> -SteveK
>
As I said last week on this very list.... yes.

Steve

_______________________________________________
Speex-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/speex-dev

_______________________________________________
Speex-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/speex-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.