Voice echo on tablets, not smartphones
Hi everyone. I have a strange problem with tablets.
Let me explain. I built a Unity application with the XR plugin in order to use a SteamVR client as final device. I also use Nvidia CloudXR to achieve the Cloud Rendering Paradigm, so my final device is not connected via cable but via network to my pc (server).
Nvidia CloudXR allows to use as a final device both a VR headset (e.g. Oculus Quest 2) and an Android device. When the device is connected to the server, SteamVR considers it a VR headset.
In my Unity application I use Photon Engine for the multiplayer features using Photon Voice to talk to other players. In Unity I'm on Windows platform beacuse my target is basically a SteamVR client. I use the SteamVR client's speakers as an output and its microphone as an input.
As mentioned, my SteamVR client, thansk to CloudXR, can be a VR headset or an android client. When I use the Oculus Quest in combination with other VR headsets or smartphones I have no problem, but when my client is a tablet, in the other device I hear my voice echo.
This only happens with tablets and not with smartphones. I use, for the Photon Recorder, Unity microphone with WebRtcAudioDsp AEC disabled. If enabled it is too aggressive and I cannot communicate on Quest or smartphone.
Of course I tried to enable WebRtcAudioDsp AEC only for the tablet but it doesn't work well. I also tried switching to Photon Microphone which provides its own AEC but the problem persists.
Any suggestions? How I can solve this problem?
just to understand your problem properly, in Unity, your build target is Windows, it means, that the built output from Unity, does not really run on the target device, but the rendered image is streamed to it using NVidia XR client, and inputs from the device are sent back to the server and processed there? If it is so, then Photon Microphone's AEC afaik can't help you, because it is based on native AEC provided by the respective platform. You can try to adjust WebRTCAudioDSP AEC (longer/shorter delay etc.), but I am not sure, if it'll help. I am afraid, that you'll need to work with the client that provides input and output on the target device, not the application, that is running elsewhere.. If working with client is not possible, and this setup (tablet as XR device) is your target production setup, then you'll need to find another way how to prevent echo - ie. require to use headphones or implement PushToTalk mechanism.0
Thank you for your answer. Yes, unfortunately tablet as XR device is my target production setup.
In the meantime I tried to create an apk with Photon Voice running directly on the tablet, using Unity Microphone as recorder and WebRTCAudioDSP AEC enabled. It seems to work.
From what I see reading the code, the WebRTC processor uses a different algorithm in case of mobile (I see a bool called "aecm" which is set to true in case of mobile platforms).
I'm trying to force the processor to use the mobile algorithm even though I'm on the windows platform. Does it make sense to you? I mean, does the algorithm for the mobile device work in conjunction with the mobile hardware, so it can't work on the desktop, or is it just a different software implementation and this could be a solution?
Considering my tests, it doesn't work, but what do you think about it?0
I think aecm is a lightweight version of aec designed to save limited mobile resources. It will work on desktop for sure since it does not depend on any hardware. The quality may be worse in theory.
You also can try aec on mobile.0