Glossary
Echo Cancellation (AEC)
Why you do not hear yourself on a speakerphone call. Acoustic echo cancellation predicts the sound leaking from loudspeaker to microphone and subtracts it before the audio is sent back.
General definition
Echo Cancellation (AEC) is the audio processing that stops a caller from hearing their own voice bounced back a fraction of a second later. When a device plays the far-end voice through a loudspeaker, its microphone picks that sound up along with the local speaker and sends it back. With the network round trip added, the far-end party hears an echo of themselves. Acoustic echo cancellation predicts that echo and subtracts it before the audio is encoded.
The canceller keeps a copy of the audio it is playing out and runs an adaptive filter that learns the acoustic path from loudspeaker to microphone: the room, the device body, the speaker response. It uses that model to estimate what the echo should sound like and removes it from the microphone signal. A double-talk detector freezes the filter when both parties speak at once so the local voice is not treated as echo, and a residual suppressor cleans up whatever non-linear distortion (clipping, cheap speakers) the linear filter could not model.
- Delay estimation is the hard part on phones and in browsers, where audio buffering between play-out and capture varies by device and can drift during a call
- Line echo, caused by impedance mismatches in the analogue phone network, is a different problem handled by network echo cancellers (ITU-T G.168)
- Headsets and earbuds remove the acoustic path almost entirely, which is why they sound cleaner than speakerphone
- Echo becomes more noticeable as delay grows: a longer round trip makes even a faint echo obvious, so latency and echo are linked
In WebRTC the canceller is part of the audio processing module that every browser ships (Chrome’s current implementation is known as AEC3), enabled by default for microphone tracks and controllable through the echoCancellation constraint in getUserMedia. It runs alongside noise suppression and automatic gain control, and on mobile it may hand off to the operating system’s own voice-processing mode, which has access to the device’s exact audio timing.
In the Ethora ecosystem
Ethora calls run on WebRTC, so echo cancellation is provided on each participant’s device by the browser or mobile WebRTC stack before audio reaches the SFU. That is the right place for it: the canceller needs the exact play-out signal and timing of the device, which only the client has, and the SFU forwards encoded audio without decoding it.
For the use cases Ethora targets, a telehealth consultation on a phone held at arm’s length or a support call from a laptop speaker, echo is the most common quality complaint after network problems, and a working canceller is the difference between a usable speakerphone call and one where both people talk over their own echo. Group calls raise the stakes, since one participant with broken echo cancellation sends echo to everyone. Testing on the devices your users actually own, not just on headsets, is the most useful pre-launch step.