Search for echo cancellation and you will find WebRTC's AEC3 first — and for good reason. It runs in Chrome, Edge and every app built on the WebRTC library, it has been tuned across an enormous volume of real calls, and it is free. If you are building a browser-based communicator, stop reading and use it.
But AEC3 is regularly proposed for products it was never designed for: door stations, intercoms, embedded speakerphones, firmware on microcontrollers. This article explains what AEC3 actually is, what it is genuinely good at, and what changes — practically, not ideologically — when you replace it with a deep-learning engine sized for embedded hardware.
What WebRTC AEC3 is
AEC3 is the echo canceller inside WebRTC's Audio Processing Module (APM). Around 2017–2018 it replaced the original desktop canceller and the lightweight mobile variant (AECM) as the default. APM processes in a fixed order — echo cancellation, then noise suppression, then gain control — and the IETF profile for WebRTC audio (RFC 7874) recommends implementations apply AEC, which is why browsers have it on by default.
Internally it is a five-stage pipeline:
- Delay estimation — continuously matching the reference against the mic to find the echo delay, which on phones can range from roughly 20 to 200 ms and drift during a call.
- Linear adaptive filtering — frequency-domain block processing (64-sample blocks, about 4 ms each) modelling the acoustic path; a well-converged linear filter typically removes on the order of 20–40 dB of echo.
- Double-talk detection — freezing or slowing adaptation while the near-end speaks so the filter does not learn your voice.
- Residual echo suppression — a non-linear safety net for what the linear model misses, such as loudspeaker distortion.
- Comfort noise — filling suppressed silences so the call does not sound like it keeps dropping.
The fair summary: AEC3 is an excellent, battle-tested canceller designed for real-time communication on desktop and mobile operating systems, with generous compute and an OS audio stack that supplies the loopback reference. Most of its engineering budget goes to problems — jittery playback buffers, drifting hardware delay, arbitrary unknown rooms — that matter enormously in a browser call.
Why it does not transplant to embedded hardware
None of that makes AEC3 "bad". It makes it a poor fit for a Cortex-M door station, for reasons that are structural rather than tuning issues:
- It expects an OS audio stack. AEC3 consumes the loopback reference that the operating system hands it. On bare-metal firmware there is no OS; you must supply sample-aligned reference audio yourself, which is exactly the integration work a canceller cannot do for you.
- Compute and memory were not budgeted for MCUs. AEC3's delay estimator, multi-block filtering and suppression machinery assume desktop-class headroom. Its C++ codebase is also large; extracting just the canceller drags in WebRTC plumbing. "It compiles for embedded" and "it fits your power budget at 16 kHz full-duplex" are different claims.
- Its hard problems are not your hard problems. On a door station the speaker-to-mic path is fixed, short and mechanically known — the 20–200 ms drifting-delay machinery buys you little. What actually ruins intercom audio is loudspeaker non-linearity at high volume and double-talk, and those need a different treatment.
What a deep-learning engine changes
A learned joint AEC+NS engine approaches the same subtraction problem differently, and the differences are concrete:
- Non-linear echo is modelled, not patched. Small loudspeakers driven loud produce harmonic distortion that no linear filter can match. A neural engine learns that mapping; a classical pipeline catches the leftovers in its residual suppressor, at the cost of audible pumping.
- Suppression and cancellation are one system. Cascading a separate NS after any AEC double-attenuates speech and corrupts the echo model; a joint engine handles both in one pass. We cover this chain-ordering problem in a dedicated post.
- Double-talk is trained, not gated. Instead of freezing adaptation, the network learns to separate overlapping voices — the metric where lightweight classical systems visibly fail.
- Footprint is a design constraint. FlyAec ships as a 1.1 MB model running in plain C on embedded CPUs — sized for the products where AEC3 cannot go.
Listen: double-talk through a real far-end call
The clip below is a full-duplex call where both sides speak simultaneously. The mic take contains the far-end echo plus the near-end voice; the enhanced take is the engine output. Judge it on one question only: is the near-end voice intact while the echo is gone?
Full-duplex call — double-talk with echo
How to choose, honestly
| Your product | Sensible default | Why |
|---|---|---|
| Browser-based communicator, web meeting app | WebRTC AEC3 | Designed for exactly this; free; maintained by the platform itself. |
| Mobile app with in-app audio stack | WebRTC APM / AEC3 | OS supplies loopback reference; compute is available. |
| Intercom, door station, speakerphone on MCU | Embedded deep-learning engine | No OS audio stack; tight RAM/compute; fixed acoustic path favours a learned model. |
| Hybrid: embedded endpoint + web console | Both, per endpoint | Use each where its assumptions hold. |
One caveat we insist on: measure on your hardware with your acoustic path. ERLE on a dev board tells you little about your sealed door-station enclosure.
Where we verify claims
We hold ourselves to the standard we ask of others: on the official ICASSP 2023 AEC challenge blind test set (800 files), FlyAec was evaluated against published baselines and achieved the highest average of the four subjective MOS categories — a comparison on a public test set, not a challenge victory, and we describe it exactly that way. The full table and methodology are on our benchmark page.
Evaluate on your enclosure, not our datasheet
Send us a recording from your intercom or door station, or try the online A/B demo with real far-end reference calls. We provide a written evaluation report including the exact test configuration.
Listen to the A/B demo Request an evaluationCommon questions
Is WebRTC AEC3 good enough?
For browser and mobile-app real-time communication, yes — it is the default in Chrome and Edge and is battle-tested. It is a poor fit only where its assumptions break: bare-metal embedded devices with no OS audio stack and tight compute budgets.
Why can't I just compile AEC3 for my MCU?
Technically parts of it compile, but AEC3's delay estimation, multi-block filtering and suppression machinery assume desktop-class headroom, and it expects the OS to supply a loopback reference. On a Cortex-M door station neither the compute/memory budget nor the reference plumbing exists.
What does a deep-learning AEC do better?
It models non-linear loudspeaker distortion instead of patching it with a residual suppressor, handles noise suppression jointly in one pass, and is trained for double-talk rather than relying on freeze/gate behaviour. FlyAec ships this in a 1.1 MB plain-C model for embedded CPUs.
Is FlyAec better than WebRTC AEC3?
Different tools for different environments. We do not run AEC3 on our target hardware, so we make no head-to-head claim; what we publish is FlyAec's result on the official ICASSP 2023 blind test set (800 files) against published baselines — the highest average of the four subjective MOS categories.
Where do I get the far-end reference signal on embedded hardware?
Tap the far-end audio digitally before it reaches the power amplifier — after decoding, before any mixing with local sounds. Wiring mistakes here are the most common cause of bad AEC in production; we describe the tap points in a dedicated article.