Double-Talk Detection in AEC
Double-talk detection explained: ERLE, Geigel algorithm, NPM, and spectral methods that stop AEC filters from diverging during simultaneous speech.

Contents & prerequisites
Prerequisites
Why does double-talk break echo cancelers?
Double-talk is the condition where the near-end speaker and the far-end speaker are both active at the same time, and it breaks acoustic echo cancelers (AEC) because the adaptive filter's error signal stops being a clean measure of echo-path mismatch. An AEC works by adaptively modeling the room's impulse response, convolving the far-end reference signal with that estimate, and subtracting the result from the microphone signal. The residual — the error signal — drives the adaptation. That scheme only works if the residual's only source of energy is echo. The moment the near-end talker speaks, the residual carries near-end speech plus echo error, and the adaptive algorithm (commonly NLMS, normalized least-mean-squares) has no way to tell the two apart.
How the adaptive filter diverges when both parties speak
The filter diverges because NLMS and its relatives update coefficients proportional to the error signal correlated with the reference signal, and near-end speech injected into that error looks, statistically, like an impulse response the filter should learn. Each update nudges the coefficients toward modeling the near-end voice as if it were echo. Over a few hundred milliseconds of double-talk at typical step sizes (μ in the 0.1–0.5 range for NLMS), the filter coefficients can drift far enough from the true room response that echo return loss collapses, producing audible echo bursts or near-end speech being partially cancelled. The filter does not fail instantly — it fails by accumulation, which is what makes double-talk detection a timing problem as much as a classification problem.
Why correlation assumptions fail during simultaneous speech
The adaptation math assumes the error signal is uncorrelated with everything except the far-end reference run through an unknown linear system. Near-end speech is statistically independent of the far-end reference, so in principle it should average out — but only over long time windows and only if the adaptation step size is small enough to integrate across many pitch periods. Real-time systems use step sizes large enough for fast re-convergence after echo-path changes (someone moves a laptop, a door closes), and at those step sizes a single loud near-end syllable can move coefficients measurably before any averaging effect helps. The assumption of uncorrelated near-end noise holds asymptotically, not instantaneously, which is exactly the regime production systems operate in.
The cost of misidentifying double-talk in real deployments
Misclassifying double-talk has two failure directions, and real deployments feel both as quality complaints: a missed double-talk event lets the filter diverge and causes a burst of echo or chopped near-end audio a few hundred milliseconds later, while a false double-talk flag freezes adaptation during a legitimate echo-path change (a chair scraping, a speakerphone being picked up) and lets uncancelled echo ring through until detection releases. Call-center QA teams typically tag both as "robotic" or "choppy" audio without distinguishing cause, so a double-talk detector (DTD) that is too aggressive and one that is too lax can produce identical support tickets.
What statistical measures identify double-talk?
Double-talk is identified by watching whether the echo canceler's own performance metrics degrade in a pattern consistent with an unmodeled near-end signal, rather than by trying to classify speech directly. Several metrics are combined because no single one is reliable alone.
Echo Return Loss Enhancement (ERLE) as a detection metric
ERLE is the ratio, in dB, of the echo canceler's input power to its output (residual) power, ERLE = 10·log10(P_in / P_residual), and it quantifies how much echo the filter is currently removing. In single-talk periods with a converged filter, ERLE typically sits in the 15–30 dB range depending on room acoustics and filter length. A sudden drop in ERLE — say from 25 dB to under 10 dB within a few tens of milliseconds — is consistent with either double-talk or an echo-path change, and distinguishing the two is the detector's actual job. ERLE alone cannot make that distinction, which is why it's always paired with a second signal.
Normalized projection misalignment (NPM) and filter divergence tracking
Normalized projection misalignment (NPM) measures how far the adaptive filter's current coefficient vector has rotated away from a reference or previous stable estimate, normalized to unit length so it's independent of absolute gain. Production systems that don't have access to a true room-response reference approximate NPM by tracking coefficient-vector drift over a sliding window; a sharp increase in drift rate correlates with the filter being pulled by an uncorrelated near-end signal rather than smoothly tracking a slow room change. This metric is more computationally expensive than ERLE because it requires storing and diffing coefficient history, so lower-power embedded designs often substitute a cheaper proxy such as the rate of change of the adaptation step size the NLMS normalization produces internally.
Cross-correlation and error power ratios during simultaneous speech
The ratio of near-end microphone power to far-end reference power, combined with short-window cross-correlation between the residual and the reference, is the core statistical test most detectors run every 10–20 ms frame. During pure far-end-only periods, the residual stays highly correlated with the reference (because residual is dominated by echo-path modeling error). During double-talk, correlation drops because near-end speech, uncorrelated with the reference, now dominates residual energy. A practical implementation computes a normalized cross-correlation coefficient over a 20 ms frame and flags double-talk when it falls below a threshold tuned per deployment, typically in the 0.3–0.5 range on a 0–1 scale, with the exact value set empirically against the installed hardware's echo path.
Why energy thresholds alone are insufficient
Energy thresholds alone are insufficient because near-end and far-end energy levels vary independently with speaker distance, gain staging, and room reverberation, so a fixed microphone-energy threshold cannot distinguish a quiet near-end talker from background noise, or a loud far-end talker from double-talk. A detector that only compares raw microphone RMS against a static threshold will both miss soft-spoken double-talk and false-trigger on room noise or far-end-only passages at high volume, which is why every production-grade detector normalizes energy against the far-end reference level rather than using it in isolation.
How do Geigel and adaptive threshold detectors work?
The Geigel algorithm detects double-talk by comparing the near-end microphone signal's recent peak level against the far-end reference's recent peak level, declaring double-talk when the microphone is unexpectedly loud relative to what echo alone would produce. It remains the most widely deployed DTD in telephony and conferencing hardware because it is cheap: a handful of comparisons per frame, no spectral transform, no matrix math.
Geigel algorithm: comparing far-end and near-end signal levels
The classic Geigel test flags double-talk when:
max(|d(n)|, |d(n-1)|, ..., |d(n-N+1)|) > c * max(|x(n)|, ..., |x(n-N+1)|)
where d(n) is the microphone (near-end + echo) signal, x(n) is the far-end reference, N is a window of recent samples (commonly spanning the estimated echo path length, often 8–16 ms worth of samples at 8–16 kHz sampling), and c is a threshold constant, typically set between 0.5 and 2.0 depending on expected echo path loss. If the microphone's recent peak exceeds the scaled far-end peak, the near end must be contributing more than echo alone could explain, so the detector declares double-talk and freezes adaptation.
Adaptive thresholds that track SNR and room acoustics
A fixed Geigel threshold c degrades as room gain, microphone sensitivity, or far-end playback volume change, so adaptive-threshold variants recompute c from a running estimate of the actual echo-path loss measured during known single-talk periods. The threshold tracks the signal-to-noise ratio (SNR) of the echo path rather than assuming a fixed loss figure, which matters because a speakerphone on a hard-surfaced conference table can have 6–10 dB less echo return loss than the same unit in a carpeted room — a static c tuned for one environment will false-trigger or miss in the other.
State machines: deciding when to freeze vs. update the filter
Every production DTD sits inside a small state machine — typically single-talk, double-talk, and echo-path-change states — because the binary output of any one frame's test is noisy and a single flagged frame should not immediately freeze or release the filter. A common structure holds at least 2–3 consecutive detection votes before transitioning state, and uses separate, usually faster, logic to detect echo-path changes (which should trigger re-convergence, not a freeze) distinctly from double-talk (which should always freeze).
| Condition | Adaptation action | Typical hold time |
|---|---|---|
| Single-talk, filter converged | Update normally | continuous |
| Double-talk detected | Freeze coefficients | until hangover expires |
| Echo-path change detected | Allow fast re-convergence | 100–300 ms |
| Silence (no far-end, no near-end) | Freeze (no useful signal) | continuous |
Practical parameter tuning for residential and conferencing systems
Residential VoIP devices and conference-room systems need different tunings because their echo paths and talker behavior differ: a phone handset has a short, stable echo path and infrequent double-talk, favoring a tighter window N and a static or slow-adaptive c; a conference room has a long, reverberant echo path and frequent interruptions, favoring a longer window and a faster-adapting threshold that re-learns echo-path loss every few seconds. Vendors publish recommended starting values in their AEC reference designs, and those values should be treated as a starting point for empirical tuning against the actual room, not a final answer.
What role does spectral analysis play in detection?
Spectral analysis improves double-talk detection by identifying speech presence patterns that time-domain energy comparisons cannot see, particularly when near-end speech is soft relative to far-end echo. Converting a frame to the frequency domain — see the Fourier Transform: Definition and Properties for the underlying decomposition — exposes the harmonic structure of voiced speech as a set of narrow peaks at the pitch frequency and its harmonics, a pattern far-end echo alone will not produce if the far-end talker's pitch differs from the near-end talker's.
Detecting speech presence using frequency-domain markers
A frequency-domain voice activity detector (VAD) run on the microphone signal, in parallel with the Geigel or correlation test, looks for spectral flatness drops and harmonic peak structure that indicate a live near-end voice rather than linear echo of the far-end signal. Because echo is a filtered copy of the far-end spectrum, its harmonic structure matches the far-end reference's; genuine near-end speech introduces a second, independent harmonic structure, and comparing the two spectra frame-by-frame is a more discriminating test than comparing total energy.
Why time-domain energy detection misses soft double-talk
Soft double-talk — a near-end talker speaking quietly while far-end echo is loud — produces almost no change in total microphone energy, so any purely time-domain test misses it, while spectral comparison can still catch the second harmonic structure riding underneath the dominant echo energy. This matters most in hands-free conferencing, where a participant's brief interjection ("sorry, go ahead") is exactly the kind of low-energy, high-value speech event that a coarse energy detector is built to ignore.
Combining power spectrum estimates with temporal coherence
The most robust detectors combine a short-time power spectrum estimate (typically a 256- or 512-point FFT at 16 kHz, giving 20–30 ms frames) with a temporal coherence measure between successive frames' spectral shape, flagging double-talk when the microphone spectrum shows a coherent harmonic pattern inconsistent with the far-end reference spectrum over 2–3 consecutive frames. This combination trades a modest amount of latency and CPU cycles for substantially lower false-negative rates on soft or interrupting speech.
How do you integrate double-talk detection into an AEC system?
Double-talk detection integrates into an AEC pipeline as a gating signal that controls the adaptive filter's step size, sitting between the error-signal computation and the coefficient-update stage, not as a separate post-processing block. The detector must run ahead of — or at worst concurrently with — each adaptation step, because any detection latency is a window during which the filter can drift.
Flagging divergence conditions before filter coefficients drift
The practical goal is to flag divergence risk before coefficients move, which means the detector's statistics (ERLE drop, correlation drop, Geigel comparison) must be computed on the current or very recent frame and acted on before that frame's error sample is used in the coefficient update — in most NLMS implementations this means gating the step size μ to zero or a small fraction of its normal value for frames classified as double-talk, rather than gating after the fact.
Hangover mechanisms: continuing suppression after double-talk ends
A hangover mechanism holds the filter in a frozen or reduced-adaptation state for a fixed interval, typically 100–250 ms, after the detector stops flagging double-talk, because near-end speech has trailing low-energy segments (breath, fricative decay) that frame-by-frame detectors often miss, and resuming full-speed adaptation immediately risks catching the tail of near-end speech as if it were pure echo. Without hangover, detectors that are otherwise accurate still let the filter take small, repeated hits at the end of every double-talk burst, which accumulate over a long call.
Balancing sensitivity (false negatives) against nuisance triggers (false positives)
Sensitivity and false-positive rate trade directly against each other through the detector's thresholds, and the right balance depends on deployment: a conferencing system with frequent short interruptions should bias toward higher sensitivity (more false positives, which cost a little re-convergence time) because missed double-talk produces audible echo artifacts that are worse for perceived quality than slightly slower re-convergence after an echo-path change.
What are the performance trade-offs in real-time implementation?
Real-time double-talk detection trades detection latency, computational cost, and output naturalness against each other, and embedded AEC designs must budget all three explicitly rather than optimizing one in isolation.
Latency budgets for detection versus filter update rates
Detection must complete within the same frame period as the adaptive filter's update cycle — commonly 8–20 ms for NLMS-based AEC — because any detection lag beyond one update interval means at least one coefficient update happens before the gate closes. Spectral methods that require accumulating 2–3 frames of coherence data add 40–60 ms of effective latency before a flag is raised, which is acceptable for hangover-style confirmation but too slow to be the sole first-line gate; most designs use a fast time-domain test (Geigel or correlation) as the immediate gate and a spectral test as a confirming, slower-acting refinement.
Computational cost of spectral estimation in embedded systems
An FFT-based spectral estimator running at 256–512 points per 16 kHz frame costs meaningfully more cycles than a Geigel-style peak comparison, and on a DSP core shared with the adaptive filter itself, codec processing, and noise suppression, that cost competes directly for MIPS budget. Designs with tight power or cost constraints often reduce FFT size, lower the spectral update rate to every second or third frame, or replace the FFT with a smaller filter-bank approximation — the same family of tradeoffs that governs filter design generally, where a structure like the Bessel Filter: Maximally Flat Group Delay is chosen specifically to minimize phase distortion at acceptable computational cost rather than to maximize any single metric in isolation.
Tuning hysteresis and state-hold times for naturalness
Hysteresis in the state machine — requiring several consecutive frames of consistent evidence before switching states, and holding a state for a minimum duration once entered — is what prevents audible "pumping," where the filter rapidly toggles between frozen and adapting and produces audible gain modulation on the residual signal. Typical minimum hold times run 50–100 ms for state entry confirmation and 100–250 ms for hangover release; these values are not derivable from first principles and are normally set by listening tests against representative call recordings for the target deployment, then validated against ERLE and NPM logs rather than tuned by ear alone.
Related reading
- Parseval's Theorem: Energy in Time = Energy in Frequency — relating time-domain and frequency-domain energy.
Learning
Sign in to track your progress.
Evidence
Public projects engineers linked to Double-Talk Detection in AEC.
No engineer has linked a project to this topic yet. Built something that proves it? Add the project and tag it with dsp-signal-double-talk-detection-in-aec — it then shows here and on your public profile.
