AEC in speex注意事项

Acoustic Echo Cancellation

The Speex library now includes an echo cancellation algorithm suitable for Acoustic Echo Cancellation(AEC).
AEC is especially useful in applications (VoIP or others) where one records from a microphone while speakers are being used.
Speex uses an implementation of the multidelay block frequency (MDF) algorithm [6].

Speex用的是频域多延时过滤算法。

Again, the algorithm is still under development, but has already been successfully used in some applications.
Echo cancellation algorithms are generally very dependent on the quality and characteristics of the processed signals. The Speex AEC is no exception and there are several things that may prevent the echo canceller from working properly, some of which are non-obvious to people with no signal processing background.

While it is always possible to encounter a bug in the Speex AEC, there are many other options that should be considered before.

有如下注意事项:

注意事项1 record和playback要使用同一个soundcard

First, using a different soundcard to do the capture and playback will not work, regardless of what some people think. The only exception to that is if the two cards can be made to have their sampling clock “locked” on the same source. However, this feature is only supported on professional soundcards.

要想使用AEC, record和playback需要使用同一个声卡,因为需要同样的采样时钟。

注意事项2 record和playback的delay要足够小

The delay between the record and playback signals must be minimal. Any signal played has to “appear” on the playback (far end) signal slightly before the echo canceller “sees” it in the near end signal. However,
excessive delay means that part of the filter length is wasted.
In the worst-case situation, the delay is such that it is longer than the filter length, in which case, no echo can be cancelled.

record信号和playback信号的延时应该足够小。也就是同步效果要良好。

注意事项3 tail length (filter length)太长等得时间长 太短导致回声消不干净

When it comes to echo tail length (filter length), longer is not necessarily better.
The longer the tail length, the longer it takes for the filter to adapt. Of course, a tail length that is too short will not cancel enough echo, but
the most common problem seen is that people set a very long tail length and then wonder why no echo is being cancelled (or why adaptation is very slow).

过滤器的过滤长度并非越长越好。越长的话,adapt需要的时间越长。太短的话会导致无法消除足够多的回声。

注意事项4 AEC的线性算法处理不了Non-linear distortion(非线性失真)

Non-linear distortion cannot (by definition) be modelled by the linear adaptive filter used in the echo canceller and thus cannot be cancelled.
It is thus best to use good audio hardware and avoid saturation/clipping
at all cost.

非线性失真的情况AEC的线性自适应滤波器处理不了。最好使用更好的硬件,来避免这个问题。

注意事项5 在其它预处理前 先调用AEC

Also, the AEC should be the first algorithm to process the microphone signal and the last algorithm to see the speaker (far end) signal.
A common mistake when implementing echo cancellation is to use noise
suppression or automatic gain control before the AEC.
Any processing, especially if it is non-linear, should occur only after the echo cancellation algorithm.

References:

AEC in speex注意事项_第1张图片
参考文献

你可能感兴趣的:(AEC in speex注意事项)