Hello Jean-Marc, I solved the variable delay problem, but I still have trouble with speex_echo_cancel(). When i try testecho.c with clean speech for far-end input and same speech with attenuation, a bit of reverb and 50-150 ms delay, all this done in sound editor, for mic input, i get 5-8 db attenuation. But when i use the same speech played and recorded for mic input, i see about 5 db of attenuation only if i remove the delay (150ms) at the beginning of mic input file to make far-end and mic input files to go almost ?in sync?, and even in this case there?s almost no attenuation during about a second after pauses in speech. Looks like the filter re-adapts after each pause. When the delay is at least 50 ms, the output of echo cancellation doesn?t differ much from mic input. I use speex1-2beta1 version, and i applied the patch you suggested. I use a sampling rate of 8000 which i have set with speex_echo_ctl(), a frame size of 128 and tail length of 2048. I have tried other tail lengths (640, 1024, 4096) with no significant effect. I use the same soundcard for capture and playback, and quality speakers and microphone to avoid nonlinear distortions. How much attenuation can the echo canceller normally produce? Is there anything you could suggest to make this work? This is really very important for me, Thanks a lot! Julia