Shantanu Gramsci
2005-Sep-05 10:45 UTC
[Speex-dev] Help needed regarding Echo Cancellation
Dear all, I need to use echo cancellation in a VOIP application using speex narrowband codec.I am facing some problems with echo cancellation. It will be very helpfull if someone can put some light on the following issues. 1: ================== -- When call is started EC works fine for first few seconds. Bur after a certain period [usually 20 sec or more] it does not work or works very bad [produces distorted or noisy echo]. -- If no one talks for some time [around 4/6 mins] EC works again for some period and after that period it fails again. -- I used echo tail 200ms. Using long echo tail [2000ms], EC works very fine but in that case CPU usage becomes very high. What should be the solution in this situation? I mean what can be the reason that EC fails after some time. 2: =================== -- I read the played packets from DirectSound Buffer and use it as echo frame. I have noticed that my echo frame is of low amplitude and many values of it are 0 [zero]. -- Since the values are small, I applied AGC on echo frame with another Speex preprocessor before passing it to EC. With this approach and echo tail 400ms, I get very good echo cancellation. But some times we get distorted audio, sounds like someone speaking in pipe or underwater. -- Is there any possibility to get distorted audio if we apply speex AGC on echo frame before passing it to EC? 3: =============-- Is there any tradeoff that if echo cancellation becomes more aggressive, the voice quality will fall or will be distorted? -- What are the ways to make EC more aggressive? Any help is greatly appreciated. Thanks in advance. Shantanu __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
> -- When call is started EC works fine for first few > seconds. Bur after a certain period [usually 20 sec or > more] it does not work or works very bad [produces > distorted or noisy echo].The most common reason for that is skips (underruns/overruns) in the audio, which change the (effective) echo impulse response abruptly. The fix for that would be in the sound interface.> -- I used echo tail 200ms. Using long echo tail > [2000ms], EC works very fine but in that case CPU > usage becomes very high.Define very high. If increasing the echo tail to 200ms makes it much better, then it's probably just a problem of sync between far end and near end (and the beginning of the echo tail being wasted because of that)> -- I read the played packets from DirectSound Buffer > and use it as echo frame. I have noticed that my echo > frame is of low amplitude and many values of it are 0 > [zero].Can't help you with DirectSound.> -- Since the values are small, I applied AGC on echo > frame with another Speex preprocessor before passing > it to EC. With this approach and echo tail 400ms, I > get very good echo cancellation. But some times we get > distorted audio, sounds like someone speaking in pipe > or underwater.NOOOOOOOOOOOOOOOOOOO! Never, ever apply any kind of processing on any of the AEC inputs (output doesn't matter), unless it's linear and constand (e.g. a filter).> -- Is there any possibility to get distorted audio if > we apply speex AGC on echo frame before passing it to > EC?It's not a possibility, it's a guarantee.> -- Is there any tradeoff that if echo cancellation > becomes more aggressive, the voice quality will fall > or will be distorted? > -- What are the ways to make EC more aggressive?Yes, it's got to do with the adaptation rate, but I wouldn't suggest you play with it unless you know what you're doing. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050906/0f32568e/attachment.pgp