Alango approach . A coustic E cho C ancellation f or L ow C ost A pplications. Interactive white paper. by Alexander A. Goldin. Presentation roadmap. Acoustic echo cancellation in mobile voice communication. Place of acoustic echo cancellation in voice communication.
Acoustic Echo Cancellation for Low Cost Applications
Interactive white paper
by Alexander A. Goldin
Acoustic echo arises due to coupling between the speaker and the microphone of a communication device. Part of the signal from the far side reproduced by the device speaker is picked by the microphone and transmitted back to the far side by a communication link which may be wired or wireless, analog or digital. The far talker perceives this as echo which is in some cases simply annoying while in others completely prevents efficient voice communication.
Acoustic Echo Cancellation (AEC) should remove all noticeable echo of the far speech from the microphone signal while preserving the near speech quality. If it does a great job, the communication is called “true full-duplex” where both near and far side may talk and hear simultaneously. In some circumstances it can really be achieved, in others we can get close to it while in some extreme cases efficient echo cancellation is not possible and we have effectively resort to half-duplex communication. Ability to provide duplex communication is defined by AEC technology at hand, type of application, used acoustic components and acoustic design. Examples are provided by two pictures below.
For a mobile phone working in the handset mode the speaker volume is relatively low so that the initial echo is rather small. With proper acoustic components and device acoustic design, the speaker distortions and the mechanical coupling between the speaker and the microphone are also small. As a result, the task of acoustic echo cancellation is relatively simple so that true full duplex communication rather easy to achieve.
For a mobile phone working in the speakerphone mode the speaker volume and the corresponding acoustic echo is much larger while the near talker voice is relatively weak. Often overdriven speaker has large distortions and possible mechanical resonances inside the phone cavity complicate the case. The task of acoustic echo cancellation becomes extremely challenging and the true full duplex communication is very difficult to achieve.
Large speech/echo ratioSmall speaker distortions
Small speech/echo ratioLarge speaker distortions
Acoustic Echo Canceller is responsible for cleaning voice communication from acoustic echo.
To be able to differentiate between echo and near side talk, Acoustic Echo Canceller is provided with the reference, speaker signal. Assuming that the far and near talks are not correlated (as signals), Acoustic Echo Canceller compares the speaker (reference) and the microphone (primary) signals trying to remove all parts of the microphone signal that are “correlated” with the reference signal. The term “correlation” is used here in wide, human sense rather than in according to strict mathematical definition.
To improve “correlation” in both human and mathematical sense, Acoustic Echo Canceller must be the first signal processing block that gets the microphone signal. No non-linear processing such as automatic gain control or signal distortions such as signal clipping is allowed on the microphone signal. Accordingly, the reference signal must be the speaker signal just before digital-to-analog conversion. No other processing or clipping on the power amplifier should be performed on the analog signal. The speaker volume control must be implemented digitally before the speaker signal is taken for reference to Acoustic Echo Canceller.
Textbook algorithms address a simplified problem where: - The primary (microphone) signal contains acoustic echo only. - Echo is considered to be a convolution of the reference (speaker) signal r(t) with the echo path F(t).
Standard textbook approaches simulates the echo path by FIR filter with variable, adaptive coefficients. The filtered reference signal that is an estimation of the echo signal is subtracted from the primary signal.
Algorithm goal: reduce the error (echo) signal e(n) as much and fast as possible
Factors to consider: convergence speed, missadjustment (error), complexity, memory
Variety of adaptive filtering algorithms is available:
Do we need anything else ?
Textbook, adaptive filtering approach addresses an unrealistic problem: - Due to system non-linearities, only part of the echo signal is described by the convolution.The other part is non-linear. It is still perceived as echo (correlated to the reference signal in wide, human sense). - Besides the echo, primary signal contains additional components such as near speech and noise.
Near side talk, noise and non-linear echo represent “wrong” error signal for the adaptive filter causing wrong adaptation
Strong near talk signal in double talk situation (when both sides are active) may lead to adaptive filter divergence.
Strong near side noise (stationary and non-stationary) complicates using double-talk detector to disable adaptation in double talk (always ON where the far side is active).
5-10% loudspeaker distortion is “normal” for mobile devices. Simulating non-linear echo by linear filtering is not possible.
To filter all echo and noise components while preserving the near talk, a practical Acoustic Echo Canceller requires
- Adaptive filtering algorithm that: Does not diverge from (or better converge to) the true echo simulation in double talk. Converges to the true echo in high near side noise. Does not diverge from (or better converge to) the true echo in silence.
- Residual echo suppressor to block non-linear and residual linear echoes;
- Noise Suppressor for attenuating ambient near side noise.
Besides performance requirements, a practical Acoustic Echo Canceller should:
- Take as small computational resources as possible (DSP clock < 20MIPS with dual MAC DSP, RAM < 8KW).
- Do not Introduce a large processing delay (<50ms).
Alango Acoustic Echo Canceling technology answers all the requirements for a practical echo canceller. It implements a proprietary adaptive filtering algorithm converging in double talk. It includes a residual echo suppressor that automatically tracks performance of echo canceller and suppress the echo if it is not masked by the near side voice. It also seamlessly integrates a high performance noise suppressor.
For the highest performance it utilizes subband processing where the input (primary and reference) signals are first divided on multiple frequency subbands. Each band is processed independently and the outputs are combined into a full band output signal. Subband processing provides multiple advantages over one (full) band processing. These advantages are explained and demonstrated in the following slides.
Alango acoustic echo canceling technology is fully scalable such that the number of subbands may be chosen to provide the best tradeoff between performance, MIPS, memory and processing delay requirements.Standard options include 8, 16, 32 subbands
Acoustic Echo Cancellation in continuous double talk posts significant challenge. Adaptive filtering algorithms try to remove all components of the primary signal that are correlated with the reference signal. Far and near talk signals are not (mathematically) correlated in a long run. However, the real life speech signals will always be correlated to some extent when correlation is computed in a short time interval. In general, the shorter time interval, the larger random correlations between the two speech signals are. For fast initial convergence and good tracking of possible changes in the echo path, the filter must have fast adaptation rate. However, during double talk a fast adaptation rate leads to wrong adaptation as the filter tries to adapt to random, short-time correlations between the near and far talk signals. If the problem is not addressed specifically, a good tradeoff between the convergence speed and double talk performance is not possible to achieve.
If double talk detector is used in an Echo Canceller, it is supposed to resolve the problem of wrong adaptation by disabling or slowing the filter adaptation when double talk is detected. Creating a reliable double talk detector is a challenge by itself. However, even a perfect detector does not provide the ultimate solution as changes in the echo path cannot be followed in double talk. Besides, with high level of near side noise (especially non-stationary), there will be continues “double talk” situation so that no filter adaptation will occur.
Alango proprietary adaptive filtering algorithm implements a control logic that provides robustness and convergence in double talk without explicitly slowing down the filter adaptation rate. The audio example below demonstrate the algorithm performance in continuous double talk situation. Press the corresponding button to here the reference (far side) signal, the primary (microphone) signal before processing, the processing result by Alango full-band adaptive filter as well as a textbook NLMS algorithm for comparison.
Advantages of subband adaptive filtering and suppression of residual echo left after adaptive filtering are explained on next slides.
Alango adaptive filter
Textbook (NLMS)adaptive filter
No processing( mic. signal )
T=0.1s – filter time span
Sample rate FS=8000
Full band adaptive filter
LF= FS x T
Subband adaptive filter
Subband adaptive filter
LS= FS x T / M
Subband adaptive filtering scheme provides significant saving of DSP clock compared to the full band implementation where the adaptive filter covers the same time span T. As an example, we’ll consider a real life voice communication scenario where the adaptive filter length corresponds to T=100ms. For the standard sampling frequency FS=8KHz, the corresponding full band filter length LF will be 800 taps.
Complexity of LMS type of algorithms is proportional to the filter length. Using RLMS = 5 as realistic LMS factor (instructions per filter coefficient per input sample), we come to the following estimation
Full band complexity: FS x L x RLMS= 8000x800x5 =32 MIPS
Let us consider the case when the input signals are divided on N complex frequency subbands, adaptive filtering is performed independently in each subband (Alango technology uses complex subband filters). For illustration, the subband decomposition stage is represented as Band Pass Filtering (BPF) followed by downsampling by factor M. To cover the same time span on the downsampled signals, the subband filters will have to be M times shorter. There are N such filters but the filters operate on complex signals with the sampling rate reduced by M.
In Alango technology M=N. For M=32 the sampling rate in each subband is reduced to FS=8000/32=250Hz and the filters are only L=800/32=25 taps length. Complex operations are more consuming (4 real multiplications to implement one complex). Thus we’ll use a complex LMS factor as: CLMS= RLMS x4 = 20 . Putting all together, we have:
Subband complexity: N x ( Fs/M x L x CLMS ) = 32x(250x25x20) =4 MIPS or 8 times reduction!!!
Subband spectral range
Full band spectral range
Alango full band adaptive filter
Alango subband adaptive filters
Algorithms of LMS type are the most widely used due to their low complexity, low memory requirements and efficiency of DSP implementation. However, convergence of LMS types of adaptive filtering algorithms is inverse proportional to the spectral diversity of its input signals (ratio of the strongest and weakest spectral components). A typical speech signal spectrum is shown on Fig.1 below and it is seen to have a relatively large spectral diversity with most energy concentrated in low frequency region (100-1000Hz). As such, full band LMS algorithms perform worse on speech signals than on a white noise. Subband processing divides the whole spectrum on narrow frequency subbands so that the spectral diversity in each band is much smaller (see Fig.2). As a result subband adaptive filters converge faster and better than an equivalent full band filter.
To compare performance of Alango full band and subband adaptive filtering technologies on the same double talk signals, use the action buttons
Full band adaptive filter
Fig.1 Typical speech spectrum
Subband adaptive filter
As it is heard from the examples, in real conditions not all acoustic echo can be removed by adaptive filtering alone. The residual echo must be suppressed by other means. The logic and implementation of Alango residual echo suppressor is discussed on next slides
Fig.2 Typical speech spectrum divided on subbands
In real life situations Acoustic echo cannot be sufficiently eliminated by an adaptive filter alone. The adaptive filter must be followed by Residual Echo Suppressor must attenuating the residual echo to a level where it is unnoticeable to the person on the far side. Residual Echo Suppressor is inherently a nonlinear processor as most of the remaining echo arises due to system (mainly speaker) nonlinearities and it is not linearly related to the reference signal. As such, Residual Echo Suppressor logic cannot be described mathematically making it the most challenging block of a practical Acoustic Echo Canceller.
Alango residual echo suppression works in the same frequency subbands as the adaptive filters and it is based on the following general principal: “attenuate a frequency band if the residual echo in it is not masked by near talk”.
For the place of Residual Echo Suppressor in Acoustic Echo Canceller, see Slides 8,14. The structure of Alango Residual Echo Suppressor subband block is shown on the left and its logic is explained below. Remember that all signals are subband signals.
If“Signal to echo” ratioT(n)/ER(n)is larger than a threshold
Thenpass the signal
Elsesubstitute comfort noise of amplitude N(n)
Microphone signal amplitude
Full band residual echo suppressor
Original microphone signal
Comfort noise only
Subband residual echo suppressor
From adaptive filter
Original microphone signal
Performing Residual Echo Suppression in narrow frequency bands provides significant advantages over the full band implementation.
In the full band implementation the microphone may be either closed or open depending on either the full residual echo is masked by a near side speech or not. If the spectrum of the residual echo and the near side speech do not overlap, no masking occurs and the microphone channel will be closed each time there is an activity on the speaker channel. This essentially leads to half-duplex performance. The situation after the echo canceller and the corresponding full band decision is depicted on the upper and middle figures on the left.
In the subband implementation (see the bottom figure), the decision are taken independently for each band. This allows passing part of the near side speech even when there is a strong residual echo in some frequency region. In general, this is the region where the energy of the near speech is small so that associated distortions are not actually noticeable.
Whenever the whole microphone channel or some of its frequency bands are closed, comfort noise should be substituted instead. Without it even the best residual echo suppressor will sound “choppy”. The be unnoticeable, spectral properties of comfort noise mast match those of the real ambient one. Subband implementation makes it easier.
Press corresponding buttons to compare full band and subband implantations of residual echo suppressor working on the same adaptive filter output
Spectrum after adaptive filter
Spectrum after full band residual echo suppressor
Full band echosuppressor withcomfort noise
Subband echosuppressor withoutcomfort noise
Spectrum after subband residual echo suppressor
After adaptive filter
Subband echosuppressor withcomfort noise
On this slide we can see and hear all components of Alango Acoustic Echo canceller working together in a continuous double talk situation with some noise at the near side. Press the corresponding buttons to listen for processing results after each stage.
No processing(mic. Signal)
Subband adaptive filter
To some extent, it is possible to evaluate Acoustic Echo Cancellation technology off-line, using signals prerecorded in specific conditions. However, the final test should always be done in real time where two persons speak from near and far sides. Human sound perception depends in a large extent on weather the person. As such, only in real time talk one is able to understand the real quality in double talk.
Real time evaluation requires establishing a voice communication link. However, when using a voice communication network, the processing being done by Acoustic Echo Canceller is integrated with network processing (e.g. line echo canceling), delays, packet losses and other problems. As such, the results depend on the current network conditions To remove these addition processing components, Alango developed a special evaluation kit where the communication line is simulated by a long cable. The structure of the evaluation kit and its photograph are shown on the pictures below.
The kit consists of the DSP box where the technology is implemented. It may be one of DSP evaluation boards that are supported by Alango technology. The DSP box is connected to an interface box with four amplifiers (to mic amplifiers and two power amplifiers). On one side the interface box is connected to acoustic components of the voice terminal where the technology is supposed to cancel acoustic echoes. On the other side it is connected to a standard telephone handset via 10m cable. The cable is long enough to go to another room to minimize acoustic coupling between far and near sides. The kit is really “plug and talk” so that no dialing is necessary. It is also easy to try the technology with different acoustic components packed into different enclosures.
Contact [email protected]
Thank you for your attention