The interview problem
Design echo cancellation for a voice assistant that must hear a person while playing audio.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume access to synchronized loudspeaker reference samples and microphone samples. Estimate the acoustic echo path, subtract its predicted contribution and apply bounded residual suppression. Detect double-talk so adaptation does not learn the near-end speaker as echo.
2. Trace the design or derivation
Playback reference and microphone → alignment → echo estimate → residual suppression
Keep a raw microphone test path for offline comparison, with consent and bounded retention. Monitor downstream command recognition in double-talk conditions. Source separation without a playback reference is a different problem and should not be presented as an equivalent replacement.
3. Calculate the example
An illustrative echo-only window falls from power 0.1 to 0.001, a 10 log10(100) = 20 dB reduction. This number says nothing about how much simultaneous human speech was damaged.
4. Failure cases and trade-offs
Clock drift, nonlinear speaker distortion and a moved device change the path. Aggressive suppression improves echo metrics while deleting quiet speech. Resetting the filter on every small change prevents convergence.
5. Validation, follow-ups and self-review
Test echo-only, near-end-only and double-talk recordings with device moves. Follow-up: what if the reference stream is delayed? Self-review: explain synchronization, adaptation and a speech-preservation metric.
Sources and related practice
Technical reference: webrtc.googlesource.com — WebRTC audio-processing module context; cancellation design and test cases are original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Design a real-time voice assistant; Design a live meeting transcription system.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.