# Webrtcdsp stereo echo cancellation

**URL:** <https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739>\
**Category:** Application Development\
**Created:** [December 21, 2023, 3:24pm UTC](https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739 "2023-12-21T15:24:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FabPoll](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/fabpoll/32/1620_2.png) [@FabPoll](https://discourse.gstreamer.org/u/FabPoll)\
**Post date:** [December 21, 2023, 3:24pm UTC](https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739/1 "2023-12-21T15:24:53Z")

</div>

Hi,

I’ve encountered an unusual issue with echo cancellation. When the webrtcdsp is enabled, the stereo functionality seems to be impaired. I’ve isolated the problem to the following examples:

> gst-launch-1.0 alsasrc ! webrtcdsp echo-cancel= **false**! webrtcechoprobe ! audioconvert ! alsasink

The microphone output is directed to the left speaker, and similarly for the right speaker.  
However, with this command:

> gst-launch-1.0 alsasrc ! webrtcdsp echo-cancel= **true**! webrtcechoprobe ! audioconvert ! alsasink

The microphone output is limited to only one channel, being played through both the left and right speakers.

Is there a specific option or capability setting I need to adjust to resolve this?

Thanks!

---

<div class="post-metadata">

**Author:** ![FabPoll](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/fabpoll/32/1620_2.png) [@FabPoll](https://discourse.gstreamer.org/u/FabPoll)\
**Post date:** [January 3, 2024, 2:46pm UTC](https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739/2 "2024-01-03T14:46:50Z")

</div>

I observed that the above command works under Debian 12 with the provided gstreamer package (1.22.0) and libwebrtc-audio-processing (v0.3.1)

```auto
$ gst-inspect-1.0 webrtcdsp
[...]
Plugin Details:
  Name webrtcdsp
  Description Voice pre-processing using WebRTC Audio Processing Library
  Filename /lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtcdsp.so
  Version 1.22.0
  License LGPL
  Source module gst-plugins-bad
  Documentation https://gstreamer.freedesktop.org/documentation/webrtcdsp/
  Source release date 2023-01-23
  Binary package GStreamer Bad Plugins (Debian)
  Origin URL https://tracker.debian.org/pkg/gst-plugins-bad1.0

```

But it does not with the gstreamer compiled from the sources (1.23.0.1), with libwebrtc-audio-processing (v1.3)

```auto
Plugin Details:
  Name webrtcdsp
  Description Voice pre-processing using WebRTC Audio Processing Library
  Filename /usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtcdsp.so
  Version 1.23.0.1
  License LGPL
  Source module gst-plugins-bad
  Documentation https://gstreamer.freedesktop.org/documentation/webrtcdsp/
  Binary package GStreamer Bad Plug-ins git
  Origin URL Unknown package origin

```

---

<div class="post-metadata">

**Author:** ![fengalin](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/fengalin/32/34_2.png) [@fengalin](https://discourse.gstreamer.org/u/fengalin)\
**Post date:** [January 15, 2024, 4:36pm UTC](https://discourse.gstreamer.org/t/webrtcdsp-stereo-echo-cancellation/739/3 "2024-01-15T16:36:11Z")

</div>

Related issue: [webrtcdsp: echo cancellation issue with stereo signal (#3220) · Issues · GStreamer / gstreamer · GitLab](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3220)
