The signal model

Far-end signal x(n) plays through speaker → room acoustics → reaches mic with delay and reverberation. Near-end signal d(n) (mic) = h(n)*x(n) + s(n) + noise, where h(n) is the unknown impulse response of the room and s(n) is the near-end speaker. AEC estimates h(n) and subtracts.

Advertisement

NLMS adaptive filter

Normalized Least Mean Squares: update filter coefficients ĥ(n) proportional to error × normalized input. Converges quickly, low complexity. μ=0.2 typical. Filter length matches expected reverb time (e.g., 200ms @ 16kHz = 3200 taps).

Advertisement

Double-talk detection (DTD)

When both far-end and near-end speak simultaneously, NLMS would 'unlearn' the room model. A DTD freezes adaptation during double-talk. Common method: compare normalized cross-correlation of mic and reference — high correlation = no double-talk, low = both talking.