Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebRTC Acoustic Echo cancelation

I'm currently working on webrtc project, and having a problem with audio echo when not using an earphone, or external mic, is there any work around or fix for this

like image 568
Ihsan Avatar asked May 23 '16 12:05

Ihsan


People also ask

Should I turn on acoustic echo cancellation?

Acoustic echo cancellation is used to remove acoustic feedback between a speaker and a microphone in telecommunication and teleconference systems. It should be enabled in situations where echos may occur. This is to enhance the audio quality and ensure clear, uninterrupted natural communication.

How do I cancel acoustic echo cancellation?

Open the Control Panel and click on Sound. Select the Recording tab, right-click the microphone being used, and select Properties. Select the Enhancements tab, disable all enhancements, and click Apply.

How does acoustic echo cancellation work?

An acoustic echo canceller is needed on both sides of the call during a video meeting to avoid echo. When one of the participants in the conversation begins to speak into their microphone, the signal is transmitted through a bridge, VOIP system or the Internet, which will delay the signal.


2 Answers

Echo cancellation is supposed to be on by default in WebRTC. You can turn it off to hear the difference:

navigator.mediaDevices.getUserMedia({ audio: { echoCancellation: false } })
  .then(stream => audio.srcObject = stream)
  .catch(e => log(e));

var log = msg => div.innerHTML += msg + "<br>";
<audio id="audio" controls autoplay></audio><br>
<div id="div"></div>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>

Echo cancellation technology can exist at many levels - software in the browser, in the OS, and sometimes even in your hardware mic - sometimes these technologies can interfere with each other.

Not knowing your system, I would recommend checking out your system's sounds settings to make sure you don't have helpful processing happening at too many levels.

For example, on OSX, there's a use ambient noise reduction feature under Sound Settings that unintuitively works better for me with WebRTC when I turn off. You only want one chef attempting echo cancellation at the same time.

If you are working on a web site for other clients, then there's not much you can do in software, and I would expect most systems to work, if not perfectly, decently well, though a headset will always be better.

like image 91
jib Avatar answered Sep 24 '22 02:09

jib


Currently there's no best solution for echo cancelation in webrtc, so the best solution i found is using AEC software, or built in echo cancelation software

like image 34
Ihsan Avatar answered Sep 22 '22 02:09

Ihsan