Marco
Marco3w ago

Voice chat lag

I implemented Normcore's voice chat in a test project, and the audio stream is extremely buggy, with voices cutting out a lot. I should point out that this happens both directly in the Unity editor and in a build. Any solutions/explanations to suggest? I'm at work, so obviously the connection is excellent.
37 Replies
kapa.ai
kapa.ai3w ago
Hi @Marco. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Voice chat issues like audio cutting out or lag in Normcore can be caused by several factors. Here are some explanations and solutions based on the official documentation: 1. Microphone Permissions & Device Settings
Make sure your default microphone device is set up correctly. On platforms that require microphone permissions (Mac, iOS, Android), ensure permissions and the Microphone Usage Description are set in Unity. Normcore will print error messages to the console if something fails, so check your player logs for more details. This applies both in the Unity editor and in builds. Incorrect permissions or device selection can cause audio to not be captured or transmitted properly, leading to cutouts or silence Voice chat common questions. 2. Network Quality & Congestion Control
Normcore uses WebRTC, which implements congestion control to adapt to varying network conditions. If your network connection is unstable or bandwidth is limited, audio packets may be dropped, causing voices to cut out. Try testing on a stable, high-quality network to see if the issue persists WebRTC implements congestion control. 3. Audio Compression & Buffering
Normcore uses the Opus codec for high-quality, low-latency audio. It automatically adjusts encoding bitrate and buffer size based on network conditions. If packets arrive late or out of order, the buffer grows to prevent interruptions, but if the connection is very poor, you may still experience dropouts High Quality, Low Latency, Audio & Video. 4. Unity Audio Engine Limitations (WebGL)
If you are testing on WebGL, note that Unity’s audio engine (FMOD) does not run on the web, and all voice chat audio is played directly through the browser. This can affect audio quality and spatialization WebGL platform notes. Suggestions: - Double-check microphone permissions and device selection. - Test on a wired or high-quality Wi-Fi connection. - Check Unity console and player logs for any error messages. - If using WebGL, be aware of browser and Unity audio limitations. - If the problem persists, try reaching out to the Normcore community on their Discord for further troubleshooting. If you need more specific help, please provide any error messages from the Unity console or logs. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@1412698112950272000> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Marco
MarcoOP3w ago
@kapa.ai My internet connection is excellent, and my Unity console isn't reporting anything related to that.
kapa.ai
kapa.ai3w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Given that your internet connection is excellent and there are no relevant errors in the Unity console, here are the most likely causes and solutions based on the official Normcore documentation: 1. Microphone Permissions & Device Selection
Even with a good connection, issues can arise if the default microphone device is not set correctly or if permissions are missing. On platforms like Mac, iOS, or Android, ensure that microphone permissions and the Microphone Usage Description are properly configured in Unity. Normcore will print errors if something fails, but it's still worth double-checking these settings Voice chat common questions. 2. AudioSource Configuration
Normcore’s voice chat uses Unity’s AudioSource for playback. If you want to customize spatialization or other audio settings, you should add your own AudioSource component to the prefab. RealtimeAvatarVoice will use your AudioSource if present. Misconfiguration here could potentially affect playback quality Voice chat common questions. 3. Unity Audio Engine Limitations
If you are running your project on WebGL, be aware that Unity’s FMOD audio engine does not run on the web, and all voice chat audio is played directly through the browser, which can affect quality and spatialization WebGL platform notes. 4. Automatic Buffering and Compression
Normcore uses the Opus codec and dynamically adjusts buffering and bitrate. If you are experiencing cutouts, it could be due to how the buffer is adapting to your specific environment, though this is less likely with a stable connection High Quality, Low Latency, Audio & Video. If you have confirmed all of the above and the issue persists, the knowledge sources do not provide further troubleshooting steps for this specific scenario. In this case, it is recommended to reach out to the Normcore team or community for more targeted support, as there may be a platform-specific or project-specific issue not covered in the documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@1412698112950272000> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Marco
MarcoOP3w ago
@kapa.ai How can I manage microphone permissions on Windows?
kapa.ai
kapa.ai3w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- I'm sorry, but the knowledge sources do not contain specific information about managing microphone permissions on Windows. The documentation does mention the importance of setting microphone permissions and the Microphone Usage Description in Unity, especially for platforms like Mac, iOS, or Android, but it does not provide explicit steps or details for Windows platforms Voice chat common questions. If you need platform-specific guidance for Windows, you may need to consult Unity or Windows documentation directly, or reach out to the Normcore community for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3w ago
<@1412698112950272000> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
maxweisel
maxweisel3w ago
How is performance in a blank project? what device are you testing on?
Marco
MarcoOP3w ago
I don't understand the first question? Sorry, I'm still new here. I'm testing this on two new computers running Windows. More specifically, one computer is connected to a Meta Quest 3S and is running in the editor, and the other is not connected to any headset and is running the scene via a build.
maxweisel
maxweisel3w ago
For the blank project question: If you create a blank Unity project, import Normcore, open the Realtime + VR Player scene and run it, do you have the same issue? Is audio bad in both directions or only from Quest to the Windows editor?
Marco
MarcoOP3w ago
In both directions
maxweisel
maxweisel3w ago
What microphone device are you using on the vanilla windows editor machine? and does it have Oculus Link installed (even if it’s not being run?) We’ve had issues with Oculus Link’s microphone device sending bad audio frames that have gaps
Marco
MarcoOP3w ago
It's the blank project. We may have changed two or three little things, but it's as if we hadn't touched anything. The standard microphone on a headset On the vanilla windows editor machine ?
maxweisel
maxweisel3w ago
you’re using the headset mic on the machine that’s “not connected to any headset and is running the scene via a build” ?
Marco
MarcoOP3w ago
yeah not a XR headset just a regular headset
maxweisel
maxweisel3w ago
ok got it. honestly I’m not sure then. we test the audio stack heavily. the only variable here I can think of are the “two or three little things” that you’ve changed but I’m not really sure how to debug this one any idea what it might be? where are you located?
Marco
MarcoOP3w ago
Yeah, I'll try to start from the blank scene again. I'll keep this post updated if I find the solution. In France
Layla
Layla3w ago
south of france, We just added a camera to the vr plyaer prefab, everything else works fine Marco will confirm I the other windows
Marco
MarcoOP3w ago
ye
Layla
Layla3w ago
Is there any particular way to set up the audio source in unity or any other settings so this issue does not happen?
maxweisel
maxweisel3w ago
I don’t think I fully understand. what was the fix? you had multiple cameras in the scene and deleted the extra one? If you want multiple cameras, I think you can use Mixer Groups in Unity. If you add an AudioSource next to RealtimeAvatarVoice you can set a Mixer Group on it there
Marco
MarcoOP3w ago
Update : I created my own gameobject and added a realtimeView and a realtimeTransform and then a realtimeAvatarVoice, and it worked well So i guess the problem come from the XR Avatar prefab (no offense) Yes i just instantiated the XR Avatar prefab instead of my own avatar, and the voice chat is very laggy again Maybe you are aware of something @maxweisel ? Okay, I know exactly why it's buggy RealtimeAvatarVoice appears twice on the VR Player prefab, once at the root and once on the head. I think this must be causing a conflict or something like that. If I disable one of the two, everything returns to normal, but in order for the mouth to continue moving in response to the sounds picked up by the player's microphone, the active RealtimeAvatarVoice must be on the head, not on the root. So, to summarize: I had a problem with Normcore's voice chat (very buggy and choppy sound), and the reason was that I was trying to make it work with the VR Avatar prefab from the VR Player scene, and the RealtimeAvatarVoice script was implemented twice on the prefab: once on the root and once on the head, which caused a conflict. Fix: Just disable/remove RealtimeAvatarVoice at the root and everything works normally.
maxweisel
maxweisel3w ago
Glad to hear you sorted it. Are you saying that in Normcore's examples we've added it twice? If you can let me know which prefab, I can have our team fix, but I'd be surprised if we shipped something like that.
Marco
MarcoOP3w ago
Yes, I'm just as surprised haha, but sometimes a small error like that can slip into the project unnoticed. The prefab in question is the VR Player mentioned in this guide: https://docs.normcore.io/guides/xr-avatars-and-voice-chat.
maxweisel
maxweisel3w ago
I've downloaded our current sample and I only see RealtimeAvatarVoice on the Head for that prefab.
Marco
MarcoOP3w ago
wtf
maxweisel
maxweisel3w ago
Is it possible this was added and then saved in your project?
Marco
MarcoOP3w ago
maybe
maxweisel
maxweisel3w ago
Both the BiRP and URP versions look good
Marco
MarcoOP3w ago
i'm trying to re import the package in a blank project
maxweisel
maxweisel3w ago
sounds good
Marco
MarcoOP3w ago
well it's seems to be my bad lol shame on me
maxweisel
maxweisel3w ago
all good! I'm glad it was an easy fix at least.
Marco
MarcoOP3w ago
yes !
maxweisel
maxweisel3w ago
Let me know if you run into any other issues
Marco
MarcoOP3w ago
alright ty

Did you find this page helpful?