W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > April 2017

Re: [mediacapture-main] Add autoGainControl and noiseSuppression constraints.

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Sun, 30 Apr 2017 15:58:53 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-298240445-1493567931-sysbot+gh@w3.org>
MDN tries to [document the web standard](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings), not the firefox implementation. But given what [MDN says for echoCancellation](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings/echoCancellation) I wouldn't expect any MDN entry to say much more than this PR.

Odd that [the fiddle](https://jsfiddle.net/jib1/c1pLd061/) didn't work. I tested it just now on both OSX and Windows 10 Pro (1607 - 14393.1066) in both FF release and Nightly. Would you mind double-checking that these are latest versions, trying it on a different system, different mic, and/or/ [file a bug](https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=WebRTC%3A%20Audio%2FVideo)?

I'll explain what you'd see and hear (though I found hearing the difference myself most clarifying): 

After giving mic permission, the checkboxes should be set like:

 ☑ echoCancellation ☑ noiseSuppression ☐ autoGainControl ☐ mute

because the first two are on by default in firefox. I recommend using a headset, and turn the volume up a bit, then flip the switches.

With ☐ noiseSuppression you should hear background noise noticeably appear.
Then with ☑ autoGainControl you should hear the background noise amplified a bit.
Finally, with ☑ noiseSuppression back on: amplification without the noise.

That's about it. AFAIK `googNoiseSuppression` and `googGainControl` work the same.

Of course, the effects on background noise are not the main point. The point is being able to record things other than talking heads. E.g. music performances, nature sounds, even ambient noise, or otherwise tailor recording to, say, a controlled environment, like an audio booth. The typical use case is to record with higher quality, since these filters sacrifice a lot fidelity, especially with stereo (some implementations even revert to mono when some of these filters are on today).

I expect people want to do these things even when the sink is a not peer connection, e.g. [MediaRecorder](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder), web audio (which may want the raw signal to work on) or in controlled environments maybe even local playback. Sure some want to send music over a peer connection as well, but putting these switches on gUM seems like the right place to cover all these use cases.

I'm not an audiophile myself, but @padenot may be able to answer more about existing uses and needs. Note that Chrome already [turns off all audio processing](http://stackoverflow.com/questions/37326846/disabling-auto-gain-conctrol-with-webrtc-app) in response to `echoCancellation`, I suspect as a kludge to support these cases.

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/444#issuecomment-298240445 using your GitHub account
Received on Sunday, 30 April 2017 15:59:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:32 UTC