SIGNAL LAB · MEASURE · COMPARE
Acoustic echo cancellation: learn the delayed path
Watch an adaptive filter learn real coefficients, then challenge it with a changed path or near-end speech.
Exact evidence inspector
Read the selected state numerically. This includes the details behind the chart rather than a preset verdict.
Show computed state
Learn, do not assume, the echo
A seeded broadband far-end signal passes through a two-tap room model. The microphone contains this delayed echo, low-level noise and an optional independent near-end tone. A normalized least-mean-squares filter starts with zero coefficients. For each sample it predicts the echo from recent far-end samples, subtracts that prediction from the microphone and updates its coefficients using the residual and input energy. The lower chart compares the actual room taps with the learned values; the upper charts show microphone and residual samples. Green output is not guaranteed clean speech.
Control the experiment
Echo path gain scales both room taps. Direct path delay places the first tap; a negative reflection follows three samples later at thirty-five percent of its magnitude. Adaptive filter taps limits how much recent input the estimator can use. NLMS learning rate controls the coefficient update; zero disables learning. Add near-end tone introduces known double-talk in the middle of the record. Freeze adaptation uses the fixture’s perfect knowledge of that interval, not a real double-talk detector. Move the echo path shifts both true taps four samples halfway through. Every setting rebuilds the identical seeded input and pauses at the beginning.
Try a failure and a recovery
Disable the near-end tone, keep gain at 0.6, delay at eight, taps at thirty-two and learning rate at 0.35. Seek to the end: learned tap eight should approach 0.6 and tap eleven should approach minus 0.21. Set taps to four; the causal filter cannot represent either delayed coefficient and substantial residual echo remains. Set learning rate to zero and verify that all coefficients stay zero. Restore thirty-two taps, enable the path change and inspect the midpoint: the old learned path is briefly wrong before the filter learns the new positions. Enable near-end tone and compare frozen versus continuously adapting coefficients.
Read the timeline honestly
Play reveals 4096 samples across sixty inspection seconds; those samples represent only 0.512 seconds at eight kilohertz. Pause freezes the view, Step advances one inspection second, Restart rewinds, Speed changes viewing pace, and Inspect time scrubs the same record. Restore defaults resets every scenario input. The inspector exposes exact weights and the latest sample. Echo-only reduction uses ground-truth residual echo over the most recent 128 samples, not a production quality score; it is undefined when echo power is zero. This small linear room, oracle freeze gate, short filter and deterministic tone omit nonlinear loudspeakers, clock drift, real speech, clipping and perceptual quality. No microphone is recorded and no audio is played.