webrtcdsp echo cancellation not working

Nik Ivanov 2centnik at gmail.com
Sun Jan 17 00:54:03 UTC 2021


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 \
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

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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210116/d369bd57/attachment-0001.htm>


More information about the gstreamer-devel mailing list