How to setup WebRTC AEC on pjsua2 (C++)

519 Views Asked by At

I'm struggling with AEC setup on pjsua2.

I've setted this already:

epCfg_.medConfig.noVad=true;
epCfg_.medConfig.ecTailLen=30;
epCfg_.medConfig.ecOptions=PJMEDIA_ECHO_WEBRTC|PJMEDIA_ECHO_USE_NOISE_SUPPRESSOR|PJMEDIA_ECHO_AGGRESSIVENESS_AGGRESSIVE;

But I'm still getting a really noisy Larsen effect when using the internal mic and loudspeaker on my Macbook Pro. If I'm using earset and the other party is using the loudspeaker, I still get echo, less noisy though.

Looking at the metrics, it's clear the AEC is not working at all:

13:53:36.750          echo_webrtc.c  WebRTC delay metrics: median=-1, std=-1, fraction of poor delays=-1.000000

...

13:53:41.429          echo_webrtc.c  WebRTC delay metrics: median=-52, std=0, fraction of poor delays=1.000000

...

13:54:56.381          echo_webrtc.c  WebRTC delay metrics: median=-60, std=0, fraction of poor delays=1.000000
0

There are 0 best solutions below