-
Notifications
You must be signed in to change notification settings - Fork 283
Acoustic Echo Cancellation does not working #157
Comments
Hi @jameszhong2008, I thought AEC was always active by default in Google's code, but I have to admit I never really looked into the details. We don't currently expose any audio settings; this will likely change with the introduction of standalone track objects (#152) but this is not available yet. I need to try to reproduce that issue, but I won't be able to do so until I'm back in the office next week, sorry for the delay. In the meantime you can try locally to change the audio options passed to the audio engine when created the track: MixedReality-WebRTC/libs/Microsoft.MixedReality.WebRTC.Native/src/interop/interop_api.cpp Line 845 in f6ae23a
You can pass a custom cricket::AudioOptions instance and try forcing echo_cancellation=true , and maybe even extended_filter_aec=true and/or delay_agnostic_aec=true too, although I would try with the former only first.
|
@djee-ms, thanks a lot, I pass AudioOption forcing echo_cancellation=true seems no difference. then I pass extended_filter_aec=true, still have howling sound, then I add delay_agnostic_aec=true. there is no howling sound but some of the voice was lose and some lower noisy sound occured. any suggestion? sorry for my bad english. |
Sorry I never tried AEC myself and I'm not an audio expert. It seems that the issue is more with the AEC experience itself, rather than with MixedReality-WebRTC. Could you maybe try to get in touch with the WebRTC folks directly and ask them? I would understand that MixedReality-WebRTC can potentially change the the audio timing, but if you have problems even with WebRTC bug tracker : https://bugs.chromium.org/p/webrtc/issues Note: I remember reading that if you ear an acoustic echo issue on one peer, then the problem is AEC on the other peer. Did you change the options on the correct peer? On both? |
Yes, I change both side, about the lower noisy sound , I add noise_suppression=true then it disappeared. |
I'll mark this issue as a feature request to expose the audio options then. |
Coincidentally, we (Kognitiv Spark) noticed the lack of echo cancellation in mid-December 2019 (even though it has been present in every previous version, including our original uwp-sdk m62 build). I can confirm that explicitly setting the cricket::AudioOptions() addresses our issue as well, so we would also like to see this feature added. For the record, I found that setting echo_cancellation=true was not sufficient on its own. Setting either delay_agnostic_aec=true OR extended_filter_aec=true alone was sufficient to remove the echo, though with delay agnostic AEC I could still hear faint traces of an echo from time to time. Extended filter AEC was impressive and seems to remove it completely. There also seems to be no conflict between the two options -- setting them both also removed the echo entirely. |
@djee-ms, I could make an attempt at the audio option configuration if you like. My thinking is to just copy the existing pattern used by the VideoDeviceConfiguration struct, adding an AudioDeviceConfiguration with a set of mrsBool members that reflect at least some of the cricket::AudioOption members and adding it as a required parameter for mrsPeerConnectionAddLocalAudioTrack(). If you think you might accept a PR like that, would you like to see all audio options exposed, or just the echo cancellation ones with others to be added on demand? |
@kspark-scott thanks for the offer, but #152 is coming really soon (matter of days) and will already have added an |
@sananbintahir #152 has added a per-track audio configuration, but settings for AEC haven't been exposed there yet. |
@fibann Is this on the roadmap? and is there a workaround for now? Not having AEC makes the library pretty much unusable for my application, which targets the Oculus Quest. |
@sananbintahir sorry, no ETA for this at the moment. You can work around this by compiling MR-WebRTC from source and passing the AEC options mentioned in the comments above to the audio source creation, the relevant lines are now at
|
@fibann I tried the workaround and built the library from source, I tried passing
But all combinations of these options produced little to no effect on the echo. I suppose this is because I am working on Unity, which adds a delay between the signals, causing AEC to not function as it should. Is this possible or am I missing something? I was also looking into a custom AEC implementation, but that would require access to the incoming audio stream and access to the microphone signal. Is it possible to get access to these in the library? |
@sananbintahir Where you able to get a workaround for your problem? I'm facing the same problem as yours and tried setting all the solutions given in this thread. But, it's not resolved yet. If you've found a workaround, could you please share ? |
@KarthikRichie I tried a lot of things, but unfortunately could not find a workaround. Eventually had to give up trying to use MixedReality-WebRTC for my application. Not sure why something as essential as echo cancellation in a communication library is not prioritized. |
@sananbintahir Okay. I as well tried every possible solution, but nothing seemed to work. Any other webrtc alternatives would you recommend/have tried for use within UWP app which overcomes these limitations ? |
@KarthikRichie Since my application mainly works on Unity, so far I haven't come across any good cross-platform solutions. There is always something you have to sacrifice. For communication just inside unity, there are many alternatives, but none of them have browser support. So it's a tricky situation. This library seemed the most promising until the echo cancellation issue came up. |
Use MixedReality-WebRTC and test it on a PC, seem like the Echo cancellation has no effect(echo and
howling sound). Is there anyway to turn it on or adjust it?
The text was updated successfully, but these errors were encountered: