Hi! I want to use speex for echo cancellation in my program, but I have bad results. I will explain what my program does. it is a client-server application. I run a server in room A and a client in room B. the client sends some voice to the server and the server plays it on loudspeakers. I run another server in room B and connects to it from room A using the same application that runs server in room A. the client from room A records from microphone and sends the recorded voice to server in room B. the server in room B plays it on loudspeakers. in room A there is also another source of voice. so in room B I am listening everything that can be heared in room A. I hope this is clear. the problem is that I don't want to hear in room B the voice that was played on loudspeakers by the server in room A. so I am using AEC on the client in room A on the voice that is recorded from microphone before sending to the client using the voice that was played on the loudspeakers as echo signal. I am using portaudio with directsound on windows xp and speex for AEC. portaudio has one callback function that is used for microphone and loudspeakers signals so they are in sync quite good. the bit rate I am using is 8000Hz, buffer length is 256 samples and filter length is 800 samples. speex initialization: st = speex_echo_state_init (NN, 800); den = speex_preprocess_state_init (NN, 8000); echo cancellation: speex_echo_cancel (st, ptr, echo1[0], e_buf, noise); speex_preprocess (den, e_buf, noise); where ptr is a buffer that was recorded from microphone, echo1[0] is a buffer that was played on loudspeakers. the delay between ptr and echo1 is 2 buffers (512 samples). with this configuration I can still hear the echo signal (althought the signal is a little more silent. when using the delay 3 buffers the echo is still not cancelled and after few seconds I don't hear anything. Can anyone help me with getting good results in echo cancellation? thanks in advance for any suggestions hs
> echo cancellation: > speex_echo_cancel (st, ptr, echo1[0], e_buf, noise); > speex_preprocess (den, e_buf, noise); > > where ptr is a buffer that was recorded from microphone, echo1[0] is a > buffer that was played on loudspeakers. the delay between ptr and echo1 > is 2 buffers (512 samples). > with this configuration I can still hear the echo signal (althought the > signal is a little more silent. when using the delay 3 buffers the echo > is still not cancelled and after few seconds I don't hear anything.when using about 10 buffers for delay between these signals the echo signal is heared as it was reverbed, everything else is ok and the noise is removed. how to completely remove the echo signal? regards hs
Hi, Indeed I too have troubles implementing echo removal, I like ask kindly to Jean-Marc (or any other) if him can put a source code demo to show us how to use effectively echo removal API and parameters in real case scenario. A big thank you! Roberto -----Messaggio originale----- Da: speex-dev-bounces@xiph.org [mailto:speex-dev-bounces@xiph.org] Per conto di hs Inviato: marted? 11 ottobre 2005 10.25 A: speex-dev@xiph.org Oggetto: Re: [Speex-dev] echo cancellation> echo cancellation: > speex_echo_cancel (st, ptr, echo1[0], e_buf, noise); speex_preprocess > (den, e_buf, noise); > > where ptr is a buffer that was recorded from microphone, echo1[0] is a > buffer that was played on loudspeakers. the delay between ptr and > echo1 is 2 buffers (512 samples). > with this configuration I can still hear the echo signal (althought > the signal is a little more silent. when using the delay 3 buffers the > echo is still not cancelled and after few seconds I don't hear anything.when using about 10 buffers for delay between these signals the echo signal is heared as it was reverbed, everything else is ok and the noise is removed. how to completely remove the echo signal? regards hs _______________________________________________ Speex-dev mailing list Speex-dev@xiph.org http://lists.xiph.org/mailman/listinfo/speex-dev