Gregory Osborne
Gregory Osborne2mo ago

Reconnect Audio after recording with the microphone

We're making a multiplayer music making application. We're recording an audio clip with the Microphone and we've discovered that as soon as we start recording it disables the Realtime Avatar Voice. I'd like to be able to reconnect the audio once we stop recording, but it seems the "_rebuildAudioStream" bool is private and we can't trigger it manually through code without destroying the component (and associated mouth move component) and readding them through code. Is there a better way?
4 Replies
kapa.ai
kapa.ai2mo ago
Hi @Gregory Osborne. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the provided knowledge sources, there isn't a direct solution to your problem. The RealtimeAvatarVoice component in Normcore is responsible for managing the voice chat functionality. It creates a microphone stream if the component is owned locally and an AudioOutput component if it's owned by a remote client. It also includes an AudioPreprocessor that sets the gain for the microphone and filters out background noise, reverb, and echo cancellation. However, the sources do not provide information on how to reconnect the audio after recording with the Microphone. The "_rebuildAudioStream" bool you mentioned is not covered in the provided sources. You might want to consider looking into the RealtimeAvatarVoice documentation (https://normcore.io/documentation/realtime/xr/voicechat) or the Common Questions (https://normcore.io/documentation/realtime/common-questions#how-do-i-spatialize-voice-chat) section for more information. If the issue persists, reaching out to the Normcore support might be a good idea. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@345432116600766475> kapa.ai is still learning and improving, please let us know how it did by reacting below
liamc
liamc2mo ago
The voice chat script is included in the package. You can just make a copy of it and make whatever changes you need Alternatively, you can access private fields via reflection if you don't want to fork the voice script
Gregory Osborne
Gregory Osborne2mo ago
I've actually decided to avoid using the Microphone locally and instead receive data from the Voice Data event on the Realtime Avatar Voice component. But now I'm running into an error where on the Quest I get like 1/3 of the data and so rebuilding the clip makes it sound like a chipmunk