EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

Echo Cancellation #620

Open superdump opened 8 years ago

superdump commented 8 years ago

On iOS there is a voice processing API for echo cancellation and other audio enhancements that should be used. I expect there is similar on android but the consistency of support may be entirely hardware dependent.

In any case, Nicolas Dufresne of Collabora Ltd has integrated the WebRTC.org audio processing into GStreamer elements. See here: https://www.collabora.com/about-us/blog/2016/07/08/gstreamer-echo-canceller/

It would be interesting to try that out in OpenWebRTC.

xelven commented 8 years ago

are u talking about gstreamer speex plugins? https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-plugin-speex.html ???

superdump commented 8 years ago

No. webrtcdsp : https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/webrtcdsp

ford-prefect commented 8 years ago

We might need to allow decisions about this to be made via API. on iOS and Linux (and maybe even macOS), it should be possible to use the system canceller. With Android, as you say, it may or may not work. FWIW, I had written the bits to do this on Linux on Android at:

https://github.com/ford-prefect/openwebrtc/commits/aec

Should be really easy to at least get the iOS version of this hooked up.

superdump commented 8 years ago

Yup. So you can enable the software processing if you need to from the app layer. I think that should mostly be relevant in Linux/Android though, right? I believe OS X and iOS have the Voice Processing API.

Another question though is whether those platform APIs perform as well as or better than the WebRTC.org stack both in terms of echo cancellation / audio processing capabilities as well as CPU/battery life.

philn commented 7 years ago

I did some tests on Linux with Arun's patch and it works fairly well!