• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
webrtcHacks

webrtcHacks

guides and information for WebRTC developers

  • Home
  • Livestream
  • About
    • Chad Hart
    • Philipp Hancke
  • Subscribe
  • Merch
  • Contact
  • Show Search
Hide Search

Reverse-Engineering Technology AEC, AEC3, Blackbox Exploration, Chrome, echo, Edge, getUserMedia, libwebrtc, machine learning, VAD Philipp Hancke · October 8, 2026

Voice agents get confused by echo too

Chrome’s new echo canceller halves a voice agent’s word error rate. It also cuts how often an agent that greets you on connect answers its own greeting.

The previous post described the ML-based residual echo estimator Chrome now runs on every microphone stream. It removes more echo than AEC3 alone, and it halves the word error rate when a voice agent transcribes the near-end talker.

In a call, leaked echo is an annoyance. For a voice agent it is input: the VAD decides someone spoke, the STT turns it into words, the LLM answers them and the TTS speaks the answer.

If you have built a voice agent you have probably seen it answer itself and put it down as a glitch. I had. This time I had a reason to suspect the browser, and a cheap way to check. From the server log:

Shell
1
2
3
4
5
6
16:39:05,013 response complete, listening re-enabled
16:39:05,503 Speech started (confirmed, active=448ms, min=384ms)
16:39:05,605 Speech soft-ended (segment=1108ms, active=448ms)
16:39:05,641 Smart Turn: complete (p=0.954, 36.5ms)
16:39:05,661 USER: Hmm.
16:39:06,533 ASSISTANT: Mmm, interesting. What's on your mind?

I had not said anything. The agent heard the tail of its greeting come back through the microphone and replied to it. In later runs the phantom turns were always single short words: “two”, “yeah”, “ok”, “no”, “please”. Other times the echo showed up as barge-in: the agent took it for the user interrupting and stopped mid-word. This happened way more often in Edge than in Chrome.

A robot monkey talks into a tin-can telephone while holding the listening can to its own ear; a baby monkey covers its mouth beside it.

Contents

  • 1. An agent that talks first
  • 2. Getting the AEC dump and having Claude judge it
  • 3. Using Edge, the agent answers itself five times as often
  • 4. Tuning VAD thresholds
  • 5. Closing thoughts

An agent that talks first

I used Hugging Face’s speech-to-speech, which supports WebRTC and runs Silero for voice activity detection, pipecat’s smart-turn-v3 for end-of-turn detection, Parakeet TDT for transcription and Qwen3 for the replies. It greets you as soon as you connect.

AEC3 works in two stages: an adaptive linear filter that models the path from your speaker to your microphone and subtracts it, and a suppressor that removes what the filter missed. How hard the suppressor works is decided by the residual echo estimator. That estimator is the part Chrome replaced.

If you want to try this yourself:

Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
git clone https://github.com/huggingface/speech-to-speech
cd speech-to-speech
git checkout 16d7f98
uv venv && uv pip install -e ".[webrtc]"
. .venv/bin/activate
 
speech-to-speech serve --device cuda --stt parakeet-tdt \
  --llm_backend transformers --model_name Qwen/Qwen3-4B-Instruct-2507 \
  --tts qwen3 --qwen3_tts_backend ggml --enable_live_transcription
 
# second terminal, from the speech-to-speech directory:
# separate venv: the demo pins an older huggingface-hub
npm ci --prefix demo
uv venv demo/.venv
. demo/.venv/bin/activate
uv pip install -r demo/requirements.txt
SPEECH_TO_SPEECH_URL=ws://localhost:8765/v1/realtime \
  uvicorn --app-dir demo server:app --port 7860

Open localhost:7860 and set the transport to WebRTC.

Hugging Face Realtime demo just after connection, showing the assistant greeting before the user has spoken.
The demo, a second after connecting. Nobody has said anything yet.

Getting the AEC dump and having Claude judge it

My setup is a nightmare for AEC, which is why I normally wear a headset: a Dell soundbar under the monitor, a Logitech BRIO sitting on top of it, everything on one desk. Echo return loss under 1 dB. That is the loudspeaker half of the previous post’s graph, the left-hand end where the model buys close to 10 dB.

The 2018 webrtcHacks article on AEC3 covers how to record an AEC dump, unpack it and read it. Recording still works the same way: open chrome://webrtc-internals, enable diagnostic audio recordings and pick a folder.

Diagnostic audio recordings enabled in chrome://webrtc-internals to save AEC dumps and input/output audio.
Enable the AEC dump in webrtc-internals

The test: connect, let the greeting play, say nothing, and see whether the agent answers itself. The greeting starts loud with no ramp-up, which makes the canceller’s job harder. We ran it a bit over a hundred times.

Claude watched the dump folder and wrote its own decoder for the format instead of building unpack_aecdump. Each dump that landed was reduced to a few numbers: render level, mic level, what went upstream, ERL, and how long the leak lasted.

Using Edge, the agent answers itself five times as often

We alternated between Edge and Chrome, with the same room, microphone and server. Edge runs AEC3. Chrome runs AEC3 with the new estimator. In the dumps that is the only difference: experiments_description lists NeuralResidualEchoEstimator in Chrome and not in Edge.

The echo reached the STT as user speech in 21 % of Edge sessions and 4 % of Chrome sessions. Every failure happened between 1.0 and 2.2 s into the session.

The AEC dump has the two signals that show why:

  • the render signal, what the agent played out through the speaker
  • the capture signal after processing, what the microphone sent upstream once the canceller was done with it
Edge greeting time series: gray render audio, red processed microphone audio, and a dashed -35 dBFS threshold. A 460 ms burst reaches -4.4 dBFS before cancellation recovers.
Grey is what the agent played, the red line is what the microphone sent upstream, both 20 ms RMS. Bars mark each span above −35 dBFS. The opening phrase is cancelled completely. The second is sent upstream at −4.4 dBFS, louder than the agent played it, for 460 ms, long enough to clear min_speech_ms. Later spans last 160, 120 and 80 ms. By 4 s the same microphone sends −90 dBFS.

The canceller does not start out weak. In six failed Edge sessions, the first burst of the greeting is cancelled by 51 to 58 dB. The second burst, about a second in, goes upstream 7 to 13 dB louder than the agent played it. Then cancellation recovers. The filter delay stays at 45 to 57 samples throughout, so the filter did not lose alignment.

The gain controller can amplify residual echo. The dumps show gain_controller2 with adaptive digital gain, starting at 15 dB with a 50 dB maximum. During the first second it sees near silence, because cancellation is working, and turns the gain up. When the suppressor lets the second burst through, that gain goes onto the echo.

The dump does not show why the suppressor lets go about a second in. That decision belongs to the residual echo estimator, the component Chrome replaced.

To compare sessions we reduced each to one number: how long the audio sent upstream stays above −35 dBFS while the agent speaks. At that level Silero calls it speech. Most Chrome sessions stay at or near zero. Edge sessions spread out, and the failures, in red, sit at the right end.

Dot plot of audio above -35 dBFS during agent greetings. Edge generally has longer leaks than Chrome; red dots mark sessions where echo triggered a phantom user turn.
One dot per session, during the greeting. Red marks the sessions where the echo reached the STT as user speech.

Tuning VAD thresholds

speech-to-speech treats a segment as user speech once Silero has counted min_speech_ms of it. smart-turn-v3 runs afterwards, on the segment Silero already accepted. It cannot drop the turn, only wait longer before answering.

min_speech_ms was 500 ms until 27 May 2026, when a commit, “Lower VAD speech confirmation to 384ms”, cut it to 12 Silero frames of 512 samples at 16 kHz. That takes 116 ms off the time to first response on every turn. It also lets shorter bursts of echo through: three of the failures land between 384 and 500 ms and would not have triggered at the old value.

The right value for min_speech_ms depends on how much echo reaches the server, and that depends on the browser. Chrome and Edge are built from the same code, but Chrome sideloads a model. Here that changes the failure rate by a factor of five.

Leak-duration dot plot with 384 ms and 500 ms VAD thresholds. Three failures at 0.40, 0.45, and 0.48 seconds lie between the thresholds.
The same sessions and the same red failures as above, with both thresholds drawn. Three of those failures sit in the shaded band, at 0.40, 0.45 and 0.48 s: long enough to clear 384 ms, not long enough for 500.

A higher threshold does not reject the echo. It only delays the decision, and that decision should be fast.

Turn detection models are usually considered more reliable than a VAD alone. Here smart-turn-v3 said complete, with high confidence:

1
2
3
16:39:05,503 Speech started (confirmed, active=448ms, min=384ms)
16:39:05,605 Speech soft-ended (segment=1108ms, active=448ms)
16:39:05,641 Smart Turn: complete (p=0.954, 36.5ms)

It was trained to tell finished from unfinished human utterances and has no notion of whose voice it hears. Its job is the opposite case: noticing that someone paused mid-thought and is not finished.

Closing thoughts

Google Chrome’s new ML-based AEC is clearly superior in ways that are noticeable – if not by humans then by machines. A human hears a bit of leaked echo and ignores it; the voice activity detection of a cascaded voice agent pipeline counts it as speech. I was surprised to find a use-case where the difference between the old AEC3 behavior in Edge and the new ML-REE in Chrome made such a big difference however.

The comparison on the speech-to-speech repository also shows how hard tuning a Voice AI system is – you need to consider and test the whole pipeline, in particular when going for lower response time. Every model in that pipeline behaved correctly: Silero detected a voice from the echo, smart-turn-v3 determined the question had ended with high confidence, Parakeet transcribed correctly. The failure happened below all of them, in a browser component the pipeline does not control and cannot see. The right value for min_speech_ms depends on it. Understanding audio behavior and evaluating it remains as critical as it was in 2018.

Getting Claude to basically automate the evaluation with the AEC dump tooling from 2018 was fun though. A hundred sessions took less than an hour.
{“author”: “Philipp Hancke“}

Reverse-Engineering, Technology AEC, AEC3, Blackbox Exploration, Chrome, echo, Edge, getUserMedia, libwebrtc, machine learning, VAD

Related Posts

  • Google Chrome downloads a new neural AEC while you are not lookingGoogle Chrome downloads a new neural AEC while you are not looking
  • Troubleshooting Unwitting Browser Experiments (Al Brooks)Troubleshooting Unwitting Browser Experiments (Al Brooks)
  • getUserMedia resolutions III – constraints unleashedgetUserMedia resolutions III – constraints unleashed
  • Surviving Mandatory HTTPS in Chrome (Xander Dumaine)Surviving Mandatory HTTPS in Chrome (Xander Dumaine)

RSS Feed

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

  • Sponsored. Become a webtcHacks sponsor

Email Subscription

Open the signup form in a new tab

webrtcHacksguides and information for WebRTC developers

Footer

SITE

  • Post List
  • About
  • Contact

Categories

  • Guide
  • Other
  • Reverse-Engineering
  • Review
  • Standards
  • Technology
  • Uncategorized

Tags

apple Bernard Aboba Blackbox Exploration Brief Chrome code computer vision DataChannel debug e2ee Edge getUserMedia Google Meet ICE insertable streams ios ip leakage janus jitsi libwebrtc MCU MoQ NAT ORTC Promo Q&A quic Safari SDP sfu simulcast standards TensorFlow TURN video vp8 VP9 w3c Walkthrough Web Audio webcodecs webrtc-internals webtransport WHIP wireshark

Follow

  • Twitter
  • YouTube
  • GitHub
  • RSS

webrtcHacks · copyright © 2026