<html><head></head><body><div>Hi,</div><div><br></div><div>Le jeudi 02 mars 2023 à 20:04 +0100, jordi domenech flores via gstreamer-devel a écrit :</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">Hi!<br>I've been trying for a while to run a simple hello world with webrtcdsp / webrtcechoprobe without success. tbh I'm far from an expert, just trying to study and understand gst, sorry if I'm being too naive...<br><br>I'm on macos M1 using latest stable (1.22) and the pipeline is:<br><br>gst-launch-1.0 -v \<br>osxaudiosrc buffer-time=20000 ! \</div></blockquote><div><br></div><div>Unlikely to be the problem, but the latency on audio src is controlled by latency-time. Normally changing latency-time (size of captured chunk) and buffer-time (how many chunk the src holds before loosing data) happens in tandem, we try to maintain some sort of 3/4x multiplier.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">queue ! \</div></blockquote><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">webrtcdsp ! \<br>webrtcechoprobe ! \<br>osxaudiosink buffer-time=20000<br>Also tried the bare minimal:<br><br>gst-launch-1.0 -v \<br>osxaudiosrc ! \<br>webrtcdsp ! \<br>webrtcechoprobe ! \<br>osxaudiosink <br><br>Actually, it's just a "port" of docs:<br><a href="https://gstreamer.freedesktop.org/documentation/webrtcdsp/webrtcdsp.html?gi-language=c#example-launch-line">https://gstreamer.freedesktop.org/documentation/webrtcdsp/webrtcdsp.html?gi-language=c#example-launch-line</a><br><br>No matter what I do, I always get infinte echo until distortion. What's wrong?!<br>Hope somebody can explain what's the problem... In any case, thanks for your time!<br></div></blockquote><div><br></div><div>The webrtcdsp/webrtcechoprobe in default configuration relies on very accurate latency reporting from the element, or a very low latency, but this is never the case with GStreamer. Also, it will not function if the rountrip latency is beyond 400ms. I can't tell what's wrong on MacOS, could be software bug, bad documentation interpretation, but if the latency is wrong, you may try your luck with delay-agnostic mode (its a property you can turn on). Its maybe leak some echo initially, but with higher CPU usage, it tends to figure-out the delay by itself. I recommend that you combine this with AGC or your own kind of noise gate.</div><div><br></div><div>Note that I did some basic verification here on Linux, just in case there would be a recent regression, but with the following synthetic test, echo stops passed about 1-2 line, I was using USB microphone and native speakers so that I have two devices on different clocks (a worst case).<br><br> gst-launch-1.0 pulsesrc device=... ! webrtcdsp ! webrtcechoprobe ! pulsesink device=...<br><br>And with delay-agnostic set, it task at least 15s to lock in. Note that with such a synthetic test you are looking for a single echo on every try.</div><div><br></div><div>Nicolas</div><div><br></div><div><span></span></div></body></html>