Can't turn echo cancellation on with stereo and opusMaxAverageBitrate=96000

I’m using JAAS and started hearing consistent echo as of this morning. I have stereo on and opus max bitrate set to 96000. Historically, I was also able to turn on echo cancellation, though in my application only the moderator has their mic on and music playing for the main part of the session. It worked perfectly: high fidelity audio for the moderator-only part of the session and no echo during the multi-party chat at the start and end.

I’m just now seeing this language in the reference config.js on github referencing those audio quality parameters:

“Beware, by doing so, you are disabling echo cancellation, noise suppression and AGC”

As of the latest JAAS release, is there really no way to support echo cancellation and audio processing??

Maybe this is a Chromium 91 issue. I realized I just upgraded. If I toggle stereo off, echo cancellation turns on and audio quality is highly affected. Setting the max bitrate doesn’t seem to work at all anymore.

You could consider using different audio tracks (or even whole different participants) for the music part and the voice part, with different constraints, and switch between them, or try changing the constraints for the track when switching between ‘modes’ (music vs. multi-party chat). I assume you don’t need stereo during the chat.

@saghul It’s your commit from 4/16 that removed configurability of those audio constraints: feat(HDAudio): Initial implementation. · jitsi/lib-jitsi-meet@99983c7 · GitHub. I’ve been running AEC with stereo (which probably hasn’t really been working in Chrome) and high opus bitrates for the last year with great results. So, I don’t believe the constraints should necessarily be wed to the HD audio use case. Can this be modified/rolled back in JAAS, please (at least re-expose the AEC toggle)?

By the way, @damencho, the issue from feat(HDAudio): Initial implementation. · jitsi/lib-jitsi-meet@99983c7 · GitHub is real. I see the opus bitrate value in the SDP offer but it doesn’t get properly negotiated and the value falls back to the default. Obviously, this isn’t related to the above commit but it’s part of overall audio quality and did just appear for me (Chrome 91?).

Yeah, that’s a good idea. Put the moderator in hdaudio mode and the participants in chat mode. I have a vague recollection that these constraints were all-or-none for the conference but definitely worth a try. Thanks for the idea.

Constraints are applied to the capture of video or audio and can be different for each participant (or even for each track of a participant).

Right, but in order to get stereo playback, it’s not enough to capture in stereo. The receiver must have stereo on as well. Back to the original issue. It is, in fact, possible to capture stereo with AEC running by toggling this flag on: chrome://flags/#enable-webrtc-capture-multi-channel-audio-processing. I think that comes out from behind the flag when this is fixed: 8133 - webrtc - Web-based real-time communication - Monorail. I still have not idea where the opus bitrate issue came from.

I’ve noticed this too (loss of echo cancellation in latest version). And I didn’t even enable opus-redundancy. I do have stereo set to “true” (although outside the 'audioquality" flag).

Are you saying the quality deprecates?

There’s apparently a new HD Audio feature that kicks in if you change either that bitrate value or enable stereo. It basically toggles off all audio processing. I can’t figure out the value since you can do the full HD config yourself if you want or choose some hybrid if that works better for your use case (like mine). They’re not exclusive states. Plus that opus bitrate value somehow broke itself in the last few days. I’m not sure I knew it at the time but that quality degradation I referred to probably has to do with the lower bitrate mono.

Yeah, this is what I’m suspecting - since you have stereo off.

Is this issue resolved? I see that the documentation in config.js still says that echo cancellation gets disabled when stereo or opus max are enabled. I can forego stereo support, but the opos max setting is very important for having good audio quality.

I haven’t heard anything more about it. I ended up enabling high bitrate for the presenter/instructor. Their AEC is then turned off but participant AEC is still on (they don’t need to have high bitrate set in order to receive). Stereo requires both sender and receiver to be enabled so that stays off for the participant. If you have a similar asymmetric application, that might work for you as well.

Late to the party.
@jlightfoot can you please let me know how you enable high bitrate for the presenter only? Is that done by passing variables when creating a meeting or is their a better way?

I do it using configOverwrite in the iframe API: IFrame API | Jitsi Meet. You could also pass the config values as URL parameters.

I’ve just installed on debian and I’ve looked at the /etc/jitsi/meet/meet.here.net-config.js but I don’t see a way to set specific settings for the presenter? Like you I’d love to stream high quality out but would prefer echo cancellation etc be still supported for guests.

So you’ll leave the config.js with the values suitable for the participants. The moderator will connect with extra URL parameters like this: https://meet.here.net/confname#config.stereo=true&config.opusMaxAverageBitrate=128000. In order for stereo to work, your participants will need to have stereo enabled as well.