Alix Ollivier
Alix Ollivier2w ago

I'm getting horrible echoes

If I get too close to another player, I start hearing my own voice from their avatar and then it echos louder and louder until it's screeching in my ear. Is this a normcore problem or a unity problem?
15 Replies
kapa.ai
kapa.ai2w ago
Hi @Alix Ollivier. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- This sounds like a feedback loop issue with Normcore's voice chat system. The problem occurs when your microphone picks up your voice coming from another player's avatar, creating an echo that amplifies over time. Normcore includes an AudioPreprocessor in the RealtimeAvatarVoice component that should handle echo cancellation, but there might be some configuration issues. According to the documentation:
RealtimeAvatarVoice includes an AudioPreprocessor that automatically sets the gain for the microphone and filters out background noise, reverb, and echo cancellation. It's worth noting that most platforms default to using hardware echo cancellation supplied by the operation system, so the AudioPreprocessor's echo cancellation functionality is not required.
Voice Chat Documentation Here are a few things you can try: 1. Check if you have proper AudioSource settings on your RealtimeAvatarVoice components. You might need to adjust the spatialization settings. 2. Make sure you're using the latest version of Normcore, as older versions might have issues with echo cancellation. 3. Check your microphone settings in your operating system to ensure hardware echo cancellation is enabled. 4. If you created your own AudioSource component for the RealtimeAvatarVoice, try removing it to let Normcore create its default one, which might have better echo cancellation settings. 5. Consider adjusting the volume levels of the voice chat to prevent feedback loops. If you continue experiencing issues, you might want to reach out to the Normcore community on their Discord for more specific assistance. Unity: 2023-11-09T17:00:00Z ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Alix Ollivier
Alix OllivierOP2w ago
if i realtime avatar voice on both my main camera and my normcore player prefab, does it mean I'm doubling the voice? @Normcore Assistant
kapa.ai
kapa.ai2w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Yes, if you have RealtimeAvatarVoice components on both your main camera and your Normcore player prefab, you would indeed be creating duplicate voice streams, which could contribute to the echo problem you're experiencing. According to Normcore's documentation, the RealtimeAvatarVoice component should typically be placed on your avatar prefab:
RealtimeAvatarVoice works on any realtime prefab as long as the RealtimeView component has an owner. Upon instantiation, RealtimeAvatarVoice uses the ownership of the RealtimeView to determine if it should be sending audio for this prefab or receiving audio to play back.
Voice Chat Documentation In the standard avatar setup, the RealtimeAvatarVoice component is typically placed on the head game object of your avatar prefab, as shown in the custom avatar creation guide:
RealtimeAvatar will create the avatar prefab structure for us. There's a game object for the player, head, and hands. Each component has a RealtimeTransform component on it, and the head has a RealtimeAvatarVoice component on it for voice chat.
XR Avatars and Voice Chat Guide Having multiple RealtimeAvatarVoice components active for the same user would cause multiple audio streams to be sent and received, which would definitely cause echoing and feedback loops. I recommend removing the RealtimeAvatarVoice component from your main camera and keeping it only on your player prefab's head object. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Alix Ollivier
Alix OllivierOP2w ago
how can i test this without uploading a new patch to the store? @Normcore Assistant
kapa.ai
kapa.ai2w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- To test your voice chat configuration changes without uploading a new patch to the store, you can use Normcore's local testing capabilities. Here are some approaches: 1. Local Unity Editor Testing: You can test your changes directly in the Unity Editor by running your scene and connecting to a Normcore room. This allows you to verify basic functionality. 2. Build and Test Locally: Create a development build that you can run locally on your device without going through the store submission process. 3. Use Normcore's Test Environment: When testing with multiple devices, you can connect to the same Normcore room by setting the same App Key in your Realtime component. 4. Google Cloud Installation (if you have Normcore Private): If you're using Normcore Private, you can test against your own server by setting the Custom Matcher URL to your installation (format: wss://<DOMAIN NAME>:3000/). Test it out For the most effective testing of voice chat issues: - Run two instances of your app (one in editor, one in a build) - Connect both to the same room - Test the voice chat functionality to see if your changes fixed the echo issue - If you're using Meta Quest, you can use the development build functionality to install and test builds without going through the store Remember that when testing voice chat specifically, you'll need at least two devices to properly verify that the echo issue is resolved, as the problem occurs when your voice is played back through another player's avatar. Hope this helps with your testing process! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@185325614775926784> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
maxweisel
maxweisel2w ago
What platform are you on? Most platforms provide their own hardware echo cancellation which should be covering this. Normcore has a software echo cancellation unit, but you generally want to avoid it (and it's not needed because of the hardware implementaitons) because it uses a ton of CPU.
Alix Ollivier
Alix OllivierOP2w ago
I'm on Quest 2 I'm hoping the issue is just that I had a avatar voice script on the main camera as well as the normcore rig
maxweisel
maxweisel2w ago
definitely let me know if you figure it out. I'm not sure how that could be happening tbh
Alix Ollivier
Alix OllivierOP2d ago
I thought I had figured it out, but it turns out that echoes only happen for one player, I believe it may be the second player to join a room. They hear their own voice coming from another player because the other player's mic picks up the sound from their headset.
maxweisel
maxweisel2d ago
What platform are they on? Also, are they testing an apk by installing it manually / via SideQuest? Or are they installing it from App Lab / the Meta Quest Store?
Alix Ollivier
Alix OllivierOPthis hour
All players play the game through the Meta Quest store. I run my game on a Quest 2, others with Quest 3 have had the same issues. It's only been in the last month or so, which makes me think that when I came back from SF, I probably broke some audio settings while pulling the project from GitHub. @maxweisel
maxweisel
maxweisel21h ago
what’s weird is it should be impossible to even make this happen on Quest Meta filters out echo before we even get microphone samples from the OS and as far as I know, it’s not even possible to disable it I only ask because sometimes they break it for the default Unity microphone API but the oculus microphone API should always work but if you’re on the store and doing entitlement checks Normcore will always use the microphone API

Did you find this page helpful?