Joining a voice channel in Vivox mutes all audio for a few seconds.

Unity: 2022.2.4f1, Vivox: 15.1.200000-pre.1
Unreal: 4.27.2, Vivox: 5.20.0.unr.0
Android Device: Google Pixel 5a, Meta Quest 2

I am testing to implement Vivox in my project and am suffering from the symptoms of the title.

I have added the latest Vivox Unity Android SDK (15.1.200000-pre.1) to my project, built and tested the sample scene provided, and confirmed that I can voice chat.
However, immediately after connecting to the voice channel, all audio is muted for a few seconds. This all audio includes the background music I added to the sample scene.
This occurs even if the microphone is permitted.

This symptom also occurred when I tried the latest Vivox Unreal Android SDK (5.20.0.unr.0). Also, it does not occur when running on Windows, only when running on Android.

I am assuming that this is probably happening because the Vivox SDK is performing some operation on the voice device when I join the voice channel, is there any way to work around this audio interruption?

Thank you.

We have this problem too, reproduced on version 16.0.0-pre.1 on Oculus Quest. No solutions thus far.

Ben

A slight delay can happen briefly but we wouldn’t expect that to happen for more than a second. We haven’t seen this reproduced internally or reported elsewhere but will keep an ear out for it in our testing.

Hi Nick,

Thanks for posting about this. Just to let you know we are seeing this 100% of the time across various builds and various headsets. It’s definitely when the Vivox channel connects, and it’s definitely limited to Android platforms only. The pause we observe happens for about a second, which (contrary to your post) is a pretty long time to have all audio cut out. It masks our music, cuts out tutorial VO we’re delivering to the player, etc. Certainly it’s unshippable in its current state. We’ll work around this in our project by connecting to the channel in a loading screen, but I’d urge you guys to take a look at this if you can. It’s a class A bug in our database right now.

Thanks Nick!

Ben

Hey there @NickFromVivox , I have just implemented Vivox for Android (for the Meta Quest 2 and 3) and I am experiencing the same issue. When any user connects to a channel, 100% of the time all game audio cuts out for about a couple seconds. I would not want to ship a game with this issue. Why is this happening, and how can it be fixed?

Thanks!

Try it on a Quest 2 build. This is the only place I see it… Mine audio cuts out for about 1.5 seconds

Please be aware that channel switching on Quest 3 works fine, it’s only the Quest 2…

I found that it’s related to the LeaveAllChannels Vivox function.
I can join channels without issue on the Quest 2, but when I Leave All Channels I get the ~1.5 second silencing of All audio.

Leave channel has the same effect.

A possible TEMPORARY work-around of joining all channels and turning the volume down on all but the one you want. This would of course be very data intensive.

Hey there @Foreman_Dev , I just read that you got Vivox working on Quest 3. Now I am wondering if you use Vivox 16 - since (for me) Vivox login works on the Quest in editor but not standalone.

Yes, I am using Vivox 16.0.1 and it works on Quest 3 both in the editor and in an Android build!

Also, I filed a support ticket about this issue and they told me they created an internal support ticket. So, I hope this results in getting the issue fixed!

Any hint why the login on the quest might fail? Could it be due to the mic permissions? Can you provide a reference implementation? Fiddling around with it since yesterday and I am stuck :frowning:

I just followed the example code given in the documentation for v16. So I would suggest looking at that, and if that is not working for you I would suggest opening a new thread since the issue you’re having is unrelated to this thread’s topic.

Any updates on this issue?

This is most likely due to how the Quest 2 reports the type of audio route that its speakers are in Android. When we detect a “speakerphone”-like route we reconfigure the system audio to use platform echo cancellation. That causes a change-up that interrupts all audio on some devices.

Luckily, with the latest Vivox SDK release (Unity SDK 16.6.0 and 5.26.0) platform echo cancellation can be disabled while Vivox provides a substitute acoustic echo canceller. On Quest 2, try disabling platform echo cancellation with this new property in 16.6.0: VivoxService.Instance.VivoxGlobalAudioSettings.PlatformAcousticEchoCancellationEnabled.

With that disabled there should be no audio interruptions when joining and leaving voice channels. However, there are tradeoffs when disabling platform echo cancellation. It’s possible that more game audio will bleed into the microphone signal because Vivox is currently only privileged with knowing the voice audio and not game audio or other device audio. The Android platform echo canceller is aware of all sound produced by the device so it is capable of cancelling all echo.

Is it possible to have this echo cancellation reconfiguration happen once at startup instead of every time the Vivox channel is changed?

The intended behavior is that VivoxService.Instance.VivoxGlobalAudioSettings.PlatformAcousticEchoCancellationEnabled = false should only need to be set once at startup for it to apply to all Vivox channel joins. Are you seeing otherwise?

No, that works fine. I was able to set that property to false and things work smoothly. I’m fine with leaving it that way if it’s the only way, but I’m curious about a way to keep using the Android platform echo cancellation without the hiccups.

If we were to keep PlatformAcousticEchoCancellationEnabled = true in order to take advantage of the Android platform echo canceller, is there a way for Vivox to “detect a speakerphone-like route” and “reconfigure system audio” and “cause a change-up that interrupts all audio” just once instead of “when joining and leaving voice channels”?

We have a project on our roadmap that will enable audio settings to be changed while in channel. This wouldn’t make it automatic yet but would allow you to switch AEC without needing to leave and rejoin the channel.

@mhakala @NickFromVivox, I think what @BahamutoD is specifically asking about is if there is an opportunity for Vivox to be refactored in such a way that the Android platform echo canceller is still enabled (thus providing the best possible echo cancellation on Meta Quest 2 and 3) but this configuration occurs only once as soon as Vivox is first initialized (for example on startup of the VR app) instead of whenever a voice channel is joined, thus preventing the actual issue of all game audio cutting out for ~3 seconds during gameplay when a user joins a game server. Essentially moving this interruption to app startup instead of mid-game.

Is that possible?

@BahamutoD @Foreman_Dev, that may be possible. I will have to test how the system behaves when it’s configured for platform echo cancellation while we also stop some of our automatic behaviors at channel join and channel leave. At worst, we’d have to keep a microphone opened and doing nothing from the start. In that case, players would have to see a microphone activity indicator even when outside of voice chat. Is there such an indicator in the Quest interface? What’s quite likely, even without having a placeholder microphone device opened, is that leaving the Android audio system in the mode required for platform echo cancellation (MODE_IN_COMMUNICATION) might lower game audio quality when not even in a voice channel. You might get lucky with Quest devices where audio quality is not hindered and a placeholder mic is not required. When we get to experimenting with this we’ll make sure to try on a Quest 2 and 3.