videocalling
Acoustic Echo Cancellation (AEC)

Acoustic Echo Cancellation (AEC)

技术

Technology that removes the echo of your own voice from the audio stream.

What is Acoustic Echo Cancellation?

Acoustic Echo Cancellation (AEC) is a critical digital signal processing technology used in real-time voice and video communication. Ideally, it prevents you from hearing your own voice coming back to you after a delay (echo).

Echo occurs when the sound from a speaker (the far-end signal) is picked up by the microphone (the near-end) in the same room and sent back to the original speaker. Without AEC, users would hear a distracting, delayed repeat of their own speech, making natural conversation nearly impossible.

How AEC Works

AEC works by creating a mathematical model of the acoustic environment (the room impulse response). It constantly monitors the audio being sent to the speakers (reference signal) and predicts what that audio will sound like when picked up by the microphone.

The AEC algorithm then subtracts this predicted signal from the actual microphone input. The result is a clean audio stream containing only the local user's speech, with the echo of the remote user removed.

Challenges in Echo Cancellation

  • Double Talk: The most difficult scenario is when both parties speak at the same time. The AEC must adapt quickly to filter out the far-end speech without distorting the near-end speech.
  • Latency: High latency (network delay) makes echo more perceptible and annoying to the human ear.
  • Dynamic Environments: Moving around a room or changing devices changes the acoustic path, requiring the AEC filter to re-converge rapidly.

AEC in WebRTC

Modern browsers (Chrome, Firefox, Safari) have built-in, highly sophisticated AEC engines as part of their WebRTC stack (often based on Google's WebRTC audio processing module). This allows web-based video calling apps to provide high-quality audio without requiring users to wear headphones, although headphones remain the best physical defense against echo.