webrtcdsp echo cancellation not working

Nicolas Dufresne nicolas at ndufresne.ca
Sun Jan 17 02:57:47 UTC 2021


Le samedi 16 janvier 2021 à 19:54 -0500, Nik Ivanov a écrit :
> Hi! I'm trying to use webrtcdsp echo cancellation with my Raspberry Pi based
> project. I'm using the Janus server for WebRTC interaction and GStreamer for
> AV processing. Here's my GStreamer pipeline:
> 
> gst-launch-1.0 \
> rtpbin name=rtpbin latency=100 \
> udpsrc port=50000 caps="application/x-rtp, media=audio, encoding-name=OPUS,
> clock-rate=48000" ! rtpbin.recv_rtp_sink_0 \
> udpsrc port=50001 caps="application/x-rtcp" ! rtpbin.recv_rtcp_sink_0 \
> rtpbin. ! rtpopusdepay ! queue ! opusdec ! audioresample ! audio/x-
> raw,format=S16LE,layout=interleaved,rate=16000,channels=1 ! webrtcechoprobe !
> alsasink \

Even with "delay-agnostic" mode set, the default latency for alsasink i sway too
high to remove echo. I would suggest to reduce the "buffer-time", which is 200ms
by default to something saner like 80ms (80000).

> alsasrc device=plughw:0,0 ! audio/x-
> raw,format=S16LE,layout=interleaved,rate=16000,channels=1 ! volume volume=10 !
> volume volume=3 ! webrtcdsp delay-agnostic=true noise-suppression-level=high !
> \
> opusenc ! rtpopuspay ! udpsink host=127.0.0.1 port=8005

About delay-agnostic, you may want to retry without it, as when it works (when
the alsa driver has precise enough delay report), it will start removing echo
immediatly.

> 
> I'm using rtpbin to receive audio data from remote clients which gets played
> back using the default alsa device. It gets forwarded over the local UDP port
> from Janus. I'm also recording from the default alsa device and sending it to
> a local UDP port to get picked up by Janus. I'm using an I2S MEMS microphone
> which by default has extremely low volume coming from the device but the
> volume boost gets me very clear audio. As you can see, the echo probe is
> located right before the sound gets pumped out to the alsasink. The actual DSP
> is applied right after the initial volume boost. I know the DSP is working
> because I can hear the noise cancellation doing its job. However, the echo
> canceller itself seems to not be working at all. I tried adjusting the
> playback volume with no effect. I also tried placing the DSP before the volume
> boost, also to no effect. Lastly, I tried enabling delay-agnostic, but that
> also didn't affect the result. I'm wondering if the DSP's and the echo probe's
> timing is not in sync, but I'm not sure how to adjust that. Any advice would
> be greatly appreciated!
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210116/872ae880/attachment.htm>


More information about the gstreamer-devel mailing list