module-echo-cancel, surprisingly, not only does echo cancellation, but also other useful effects, like automatic gain control and noise reduction. However, these effects are only applied when something is being played through the echo-cancelled sink. I think this is wrong: these effects should be always applied, because they are useful for voice-recorder applications. To demonstrate the bug: 1. Load the module: pacmd load-module module-echo-cancel In my case, it attaches to the analog output of my onboard soundcard and to my webcam's microphone. 2. Copy (for monitoring purposes) the output of the echo canceller to the headphones, in a way that the echo canceller does not see this loopback: pacat --record --device alsa_input.usb-046d_0821_39BD2FC0-00-U0x46d0x821.analog-stereo.echo-cancel | pacat --playback --device alsa_output.pci-0000_00_1b.0.analog-stereo At this point, you should hear room noise and microphone hiss. The same hiss would be recorded if you use parec to record the sound into a wav file. Microphone hiss is exactly this bug. 3. Now open a new terminal and play silence through the echo canceller: pacat --playback --device alsa_output.pci-0000_00_1b.0.analog-stereo.echo-cancel /dev/zero Result: no more microphone hiss! I want this without the need to create a dummy stream.
this is with the speex or webrtc EC implementation?
I have tested with webrtc, but I believe that it applies to both. See the code: http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/echo-cancel/module-echo-cancel.c#n882 It causes the samples to be copied when nothing is being played, and it applies to all engines.
seem bug of your USB web can Mic capture volume control state.U0x46d0x821 { control.1 { comment.access 'read write' comment.type BOOLEAN comment.count 1 iface MIXER name 'Mic Capture Switch' value true } control.2 { comment.access 'read write' comment.type INTEGER comment.count 1 comment.range '0 - 52' comment.dbmin -7100 comment.dbmax -1900 iface MIXER name 'Mic Capture Volume' value 47 } }
Raymond, what you are telling me about is a different bug (if a bug at all). The reported bug is hardware-independent, and I know the sounce line that causes it. If you want to discuss the mixer bug, please contact me via e-mail.
Noise suppression and AGC are done in the webrtc backend. I would like to be able to separate those out into a different filter so we can use them for non-voip use-cases. I'm not too pleased about the idea of making yet another virtual sink/source for the purpose, but at the moment, that'd be the way to go.
Pushed a fix for this: commit 12b5e7c87365e4dbbc4c5fdd8a3579099e5902b5 Author: Arun Raghavan <git@arunraghavan.net> Date: Wed Nov 18 08:26:47 2015 +0530 echo-cancel: Don't skip canceller when sink is inactive This forces the canceller engine to be invoked even if playback is not currently active. We need to do this for cases where the engine provides additional processing that is independent of playback, such as noise suppression and AGC. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=83557
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.