De Ce Echo Cancellation
Când AI-ul vorbește, sunetul din speaker poate fi captat de microfon și trimis înapoi. Fără AEC, utilizatorul își aude propria voce cu delay - foarte deranjant.
Types of Echo
Acoustic Echo
Cause: Speaker audio captured by microphone
Solution: AEC (Acoustic Echo Cancellation)
Line Echo
Cause: Impedance mismatch in phone lines
Solution: LEC (Line Echo Cancellation)
Network Echo
Cause: Packet delays causing voice return
Solution: Network-level handling
AEC Processing Pipeline
Reference Signal
Capture audio being played (far-end)
Adaptive Filter
Model the acoustic path speaker → mic
Echo Estimate
Predict echo that will appear in mic
Subtraction
Remove predicted echo from mic signal
Residual Suppression
Clean up remaining artifacts
WebRTC AEC
Browser-ele moderne includ AEC în WebRTC. Pentru voice AI în browser, folosește getUserMedia cu echoCancellation enabled:
// Get microphone with echo cancellation
const stream = await navigator.mediaDevices.getUserMedia({
audio: {
echoCancellation: true, // Enable AEC
noiseSuppression: true, // Enable NS
autoGainControl: true, // Enable AGC
// Advanced constraints
echoCancellationType: 'system', // or 'browser'
latency: 0.01, // Low latency hint
}
});Quality Metrics
| Metric | Description | Target |
|---|---|---|
| ERLE (Echo Return Loss Enhancement) | dB of echo reduction | >30 dB |
| Echo Path Delay | Time between speaker and mic | 10-200ms |
| Double-Talk Performance | Quality when both parties speak | |
| Convergence Time | Time to adapt to new environment | <1s |
Double-Talk Challenge
Cel mai dificil scenar: ambii vorbesc simultan. AEC-ul trebuie să: