[Speex-dev] Stereo AEC

Nicholas Xu xunich at gmail.com
Tue Feb 9 06:58:58 PST 2010


Hi,

Can anybody show me how to enable stereo AEC, I tried with the
following code and the result is bad, degraded output.

Init:

ec_state = speex_echo_state_init_mc(frame_size, aec_tail, 2, 2);
speex_echo_ctl(ec_state, SPEEX_ECHO_SET_SAMPLING_RATE, &sample_rate);

preprocess_state_left = speex_preprocess_state_init(frame_size, sample_rate);
preprocess_state_right = speex_preprocess_state_init(frame_size, sample_rate);

speex_preprocess_ctl(preprocess_state_left ,
SPEEX_PREPROCESS_SET_ECHO_STATE, ec_state );
speex_preprocess_ctl(preprocess_state_right ,
SPEEX_PREPROCESS_SET_ECHO_STATE, ec_state );

AEC:

speex_echo_cancellation(ec_state, mic, echo_ref, output);
speex_preprocess_run(preprocess_state_left, output);
speex_preprocess_run(preprocess_state_right, output);

Is there anything wrong with my code?

Thanks in advance.
Nicholas


More information about the Speex-dev mailing list