NOISE REDUCTION/ECHO CANCELLATION

4,916 views
Skip to first unread message

ROWLAND MWALE

unread,
Mar 24, 2014, 8:12:14 AM3/24/14
to eas...@googlegroups.com
Hi

Any ideas/suggestion on noise reduction in a video call application. I am experiencin severe noise in my project (based on the video_audio demo). This despite muting "myvideo" local video (muted="muted"). the noise is more severe at the begining of the call.

thnks in advance.

Eric Davies

unread,
Mar 24, 2014, 2:05:45 PM3/24/14
to eas...@googlegroups.com
Don't run both clients in the same room (one computer's mike will pick up the other computers speakers).
Get yourself a conference microphone/speaker system as they are designed for this use.

Last I heard, the audio api couldn't access remote audio streams, which means you can't automatically muted your own mike when the sound coming out of the speaker is greater than a threshold volume.

You might want to check the webrtc discussion group to see if anybody has a solution there:

ROWLAND MWALE

unread,
Mar 25, 2014, 5:41:36 AM3/25/14
to eas...@googlegroups.com
thnks Eric, running both clients in the same room/on the same machine is indeed what i was doin. Hav searchd around webrtc groups and hav found one solution thats workd for me. it suggest that i shouldnt keep my input and output streams close together and hence to use my Headphones rather than the built-in speakers. This also concurs wth your suggestion. 

Thnks

tlindi

unread,
Jun 19, 2014, 7:57:00 AM6/19/14
to eas...@googlegroups.com
Hi

I'm running EasyRTC and EasyRTC demos.
 
Client device is Window 8.1 All-In-One PC with build in Cam, Mic and speakers with Google Chrome (35) or latest Chrome Canary from Google. Goal is NOT to use headphones and NO external mic. We are experiencing a bad echo with the setup. The PC Audio Enchancements settings (from "DTS Audio Control Panel" utilitily) do not have much of effect. Other client with headphones hear their own voice, alot.

I'd like to test audio setting similar to: http://pastie.org/pastes/8282690
 
Where (what file) should I modify to set those settings (or is there EasyRTC "standard" way to set them)?

A quick sample would be very nice..

I'd also would love to know exact location (or debug setting and file) where to verify / check following during call, please:
-audio settings
-used codec and
-sample rate (44,1/48kHz).
 
I could not find any of those from from chrome://webrtc-internals.
 
br,
 
tlindi

Eric Davies

unread,
Jun 19, 2014, 11:25:53 AM6/19/14
to eas...@googlegroups.com
Hi Tlindi,

The first trick with preventing echos is "don't run both ends of the same call in the same room". You'd think this would be obvious but a lot of people make that mistake. If both ends of the call are in the same room, one person's microphone will pick up the other person's speakers.

The second trick is use a decent conference sound system that has echo cancellation built in. At the office, we have a pair of Sound Blaster AAX 200's (about $150/apiece at the time) that work wonders using an array of microphones and a technology called beam forming. You can't expect the same functionality from the cheap junk they put into most laptops. 

There used to be a way to control chrome's echo cancellation via chrome:settings, but I don't see it there any longer. To the best of my knowledge, the ability to control echo cancellation isn't present in the WebRTC Javascript API, only in the C++ API that native clients have access to. You may want ask the question on the WebRTC discussion group  (framed in terms of javascript webrtc api rather than easyRTC). If you don't see it in the chrome internals, then we have no ability to "read it" from the Javascript API.

Eric. 

tlindi

unread,
Jun 25, 2014, 4:28:32 AM6/25/14
to eas...@googlegroups.com
I know the same room effect. I learned issue in videoconference hardware development company around 1996 ;)

The HP EliteOne 800 AiO PC has quite high price tag in it and build in dual mic array with beam forming support.

As I stated in my question: We'd like to use it without external mic.
 
I understand from your answer there's nothing we can do from EasyRTC API (or chrome://webrtc-internals) about checking codec status and/or adjusting googEchoCancellation and other audio settings?

Eric Davies

unread,
Jun 25, 2014, 11:57:39 AM6/25/14
to eas...@googlegroups.com
I had the belief that there was nothing we could set from the browser, however, I ran into a recent post yesterday about some special URL arguments you could pass to googles appspot demo for setting bandwidth and echo cancellation, suggesting it is possible with WebRTC. I'll look into that sometime today to see if it's something easily added to easyRTC.

Zoran Krnetic

unread,
Jul 10, 2014, 4:16:53 AM7/10/14
to eas...@googlegroups.com
I'm also interested if audio codec and audio settings can be changed in EasyRTC. Eric, do you have any news?

Thanks,
Zoran

Eric Davies

unread,
Jul 10, 2014, 5:18:29 PM7/10/14
to eas...@googlegroups.com
I've gone through apprtc's main.js and found where they edit the sdp records for setting video/audio bandwidth/codecs, but I don't see anything in the code itself for modifying noise/echo cancellation.This may be a case where the documentation on one person's page didn't get updated with the other's guys code.

I've added some new functionality to the beta branch for setting your own sdp filters, and provided an example of one in api/labs/easyrtc_rates.js, so if you find something that involves twiddling with the SDP records, it will be relatively trivial for you to experiment with it. 

Zoran Krnetic

unread,
Jul 11, 2014, 5:10:33 AM7/11/14
to eas...@googlegroups.com
Eric,

I did exactly the same yesterday- and came to the same conclusion. Apprtc is using OPUS codec, same as easyrtc but their audio is waaay better, especially on Android phones, where echo and noise make easyrtc practically unusable. But I noticed one more thing- their echo cancelation is not working in Firefox. So it must be that they are forcing some Chrome built-in echo cancelation with their SDP. I will experiment with SDP records and see if that will improve audio.

Thanks,
Zoran

gianni

unread,
Jul 13, 2014, 2:27:04 AM7/13/14
to eas...@googlegroups.com

Eric Davies

unread,
Jul 14, 2014, 12:03:20 PM7/14/14
to eas...@googlegroups.com
According to the thread pointed out by Gianni, to turn off echo cancellation, you'd want a media constraint that looked like:
     { audio: { optional: [{ your options }] } }

Looking at the easyrtc code, you should be able to do
     easyrtc.enableAudio({ optional: [{ your options }]});

And expect that to be passed down to getUserMedia. It's not a documented use, but the enableAudio doesn't do a !! on the argument to force it to boolean (which it probably should have).

However, the thread mentions that as happening in version 37, while production version is 25. So I wouldn't expect it to work anywhere except in Canary.

Zoran Krnetic

unread,
Jul 15, 2014, 11:45:45 AM7/15/14
to eas...@googlegroups.com
I have tried enabling and disabling all of the following : googEchoCancellation, googEchoCancellation2, googAutoGainControl, googAutoGainControl2, googNoiseSuppression, googNoiseSuppression2. That, unfortunately did not resulted in any improvement. When tested with Android phone or tablet without headset  our easyrtc based app is having severe echo making it almost unusable. Only case where it does not is when testing with Samsung Galaxy 5 which have hardware echo cancelation. After couple of days messing around with SDP changes and getUserMedia settings I was not able to produce sound quality nowhere near apprtc.appspot demo app. 

Did somebody actually succeeded to suppress echo and how did you do it?

Zoran

gianni

unread,
Jul 15, 2014, 2:32:29 PM7/15/14
to
If I understand well,  we are talking about two clients running in the same room and using speakerphones instead of earphones, otherwise i don't have any echo or other sound quality problems.
I am using basically Chrome latest stable version but also Firefox, on win xp, win 7, android mobile (moto g).

I tested the apprtc demo using 
two windows on desktop with microsoft entry level camera/mic, a jbl home speakerphone and
a mobile turned to speakerphone
and found no differences in the sound echo or other, if sound level is raised more than 10%, echo starts .

The above is the same behavior with easyrtc demos and my app.

When, in my app, i getusermedia with optional googEchoCancelation2 (two windows on same pc) i am able to raise the volume to 18-20% instead of 10%. This is wrong, the volume increase was not related to googEchoCancelation2.

goog* are supported only by chrome. 


Zoran Krnetic

unread,
Jul 17, 2014, 8:58:32 AM7/17/14
to eas...@googlegroups.com
No, not in the same room, but at the different locations. Using speakerphone on Android phone on one side and MacBook speakers and built in mic on the other. Both with latest versions of Chrome.

However, thanks to Eric's help I was able to figure out what Google is doing in apprtc which makes it echo-free in the setup mentioned above: If on Android device, they force ISAC/16000 codec for audio send instead of opus/48000/2 which is default. That alone solves the echo problem. At first attempt I was also setting googEchoCancelation2 to true and some other peer conn. settings. But then I removed that and still no echo. So just force ISAC/16000 as audio send if on Android and you are fine.

I'm now using easyrtc beta code and have added following in easyrtc.connect:

//if on Android device, set audio send codec to ISAC/16000 to suppress echo
  if (navigator.userAgent.match(/android/i)) {
  var remote_filter= easyrtc.buildRemoteSdpFilter({audioSendCodec: 'ISAC/16000'});
  log(remote_filter);
  var local_filter= easyrtc.buildLocalSdpFilter({audioRecvCodec: 'opus/48000/2'});
  log(local_filter);
  easyrtc.setSdpFilters(local_filter,remote_filter);
  }

Thats it! No echo with Android devices anymore.

Zoran 

mid...@outlook.com

unread,
Jul 29, 2015, 3:44:33 PM7/29/15
to EasyRTC, zoran....@gmail.com
Hello,

I have observed that in last few weeks Easyrtc is giving lot of noise and echo on chrome.
whereas there is no echo or noise for Firefox

I have tested with https://demo.easyrtc.com/demos/demo_multiparty.html and can reproduce the issue on multiple computers
Steps to reproduce : 
1. get latest update of chrome on 2 computer in separate rooms and open the above link
2. When you allow you audio and video each person gets self echo.(can hear yourself from the browser)

Have there been any changed in google chrome updates which have caused the echo issues? if so how to fix it?
(My current google chrome version is Version 44.0.2403.107 m and this issue was there on 43 also)
Would really appreciate help on this.

mid...@outlook.com

unread,
Jul 29, 2015, 3:47:01 PM7/29/15
to EasyRTC, eric....@priologic.com
Hello Eric,
(Apologies for the re-post as earlier went to Zoran)

Eric Davies

unread,
Jul 29, 2015, 3:59:03 PM7/29/15
to EasyRTC, zoran....@gmail.com, mid...@outlook.com

mid...@outlook.com

unread,
Jul 29, 2015, 4:37:08 PM7/29/15
to EasyRTC, zoran....@gmail.com, eric....@priologic.com
Dear Eric,

Thanks for your prompt revert. Please let me know if there is a known Chrome version which works well with specific easyrtc version which can be advised to users. We are facing severe problems with noise and severe echo which comes randomly. In 2014 and early 2015 this did not happen.


Eric Davies

unread,
Jul 29, 2015, 4:47:35 PM7/29/15
to EasyRTC, zoran....@gmail.com, mid...@outlook.com
I suggest you ask on the webrtc-discuss group. I have no easier way of finding out which versions of chrome work properly than you do.
Reply all
Reply to author
Forward
0 new messages