Thanks a lot for your responses Olga &
胡海, really appreciate it, you're saving me days of going down a rabbit hole that goes nowhere!It sounds like using Chrome's instance-wide-aec out of the box is not an option, for a couple of good reasons.
In that case, taking a step back, I would really appreciate any suggestions on how to approach this, because I suspect that my challenge might be simpler that the general problem of "AEC in a video call with a remote participant".
What I'm trying to make happen involves no remote participant, and no microphone feedback loop. Basically imagine you're at your laptop, watching a YouTube video, while also recording a voice note. The issue is that if the user isn't wearing headphones, the youtube audio coming out of the laptop speakers bleeds into the microphone, so I'm double recording it. I have access to these two separate audio streams: the pure system audio (so, just the youtube video) and the microphone, and I think my challenge is essentially just cancelling out the system audio from the microphone stream when necessary.
Is there any library that could do this for me (by feeding it these two audio streams and asking it to cancel A from B), so I don't have to roll my own audio processing code? Can I perhaps leverage the WebRTC AEC (3?) code, if it's not too tightly coupled with the Chromium instance?
Thanks again!