Amplify Voice
My app requires the person within a trigger zone to amplify that persons Realtime Avatar Voice. I understand there is limitations on the volume. I basically need the persons voice to be able to project throughout the entire world in the trigger zone so everyone in the crowd can hear that person. Any way to do that? I made a script but it doesn't seem to amplify the Realtime Avatar Voice
7 Replies
Hi @Rex G. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Normcore’s voice chat system, via the
- This only affects playback on the local client. You must ensure that all clients in the crowd apply this change when the speaker enters the trigger zone. - You cannot make the voice louder than the original audio sent by the microphone, but you can make it non-spatialized and at maximum playback volume for everyone. Reference:
Normcore voice chat uses Unity’s audio engine, and you can adjust spatialization and volume via the
RealtimeAvatarVoice
component, uses Unity’s AudioSource
for playback. This means you can adjust the perceived volume and spatialization using standard Unity audio settings. However, there are some important limitations and considerations:
- Volume Limitation: The actual audio data sent over the network is not amplified; you can only adjust how loud it is played back locally by modifying the AudioSource
volume. There is no built-in way to increase the microphone input gain or send a "louder" stream to all clients.
- Spatialization: By default, voice chat is spatialized using Unity’s audio engine. To make a voice "project" throughout the world (i.e., be heard everywhere at full volume), you can disable spatialization and set the AudioSource
to 2D or set its spatial blend to 0. This will make the voice non-positional and equally loud for all listeners, regardless of their position.
How to amplify a voice in a trigger zone:
1. Detect when the avatar enters the trigger zone.
2. On all clients, find the RealtimeAvatarVoice
's AudioSource
for that avatar.
3. Set the AudioSource
's spatialBlend
to 0 (2D sound) and increase its volume
property.
Example (to be run on each client, not just the speaker):
Important:- This only affects playback on the local client. You must ensure that all clients in the crowd apply this change when the speaker enters the trigger zone. - You cannot make the voice louder than the original audio sent by the microphone, but you can make it non-spatialized and at maximum playback volume for everyone. Reference:
Normcore voice chat uses Unity’s audio engine, and you can adjust spatialization and volume via the
AudioSource
attached to RealtimeAvatarVoice
Voice Chat Reference, Spatialization FAQ.
If your script is not working, double-check that you are modifying the correct AudioSource
on all clients, and that the changes are applied when the avatar enters the trigger zone. If you need more advanced control (like a "PA system" effect), you may need to implement custom logic to broadcast the audio stream to all clients, but this is not directly supported by Normcore’s built-in components.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@918869683929768036> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@kapa.ai using UnityEngine;
using System;
using System.Collections;
public class LipSyncAmplifierTrigger : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if (!other.CompareTag("Player")) return;
var amplifier = other.GetComponentInChildren<VoiceAmplifierSync>();
if (amplifier != null)
{
amplifier.SetAmplified(true);
Debug.Log($"[AmplifierZone] Amplified voice for {other.name}");
}
}
private void OnTriggerExit(Collider other)
{
if (!other.CompareTag("Player")) return;
var amplifier = other.GetComponentInChildren<VoiceAmplifierSync>();
if (amplifier != null)
{
amplifier.SetAmplified(false);
Debug.Log($"[AmplifierZone] Reset voice for {other.name}");
}
}
}
Let me check the knowledge base for you again. One moment! :books:
----------------------
Your script for triggering voice amplification is a good Unity approach, but based on the Normcore documentation, there are some important limitations and requirements to be aware of:
1. Normcore Voice Amplification Limitations:
Normcore’s
Your
You need to ensure that the amplification state is synchronized across all clients. This typically means using a synced property (e.g., a value in a
You cannot make the voice louder than the original microphone input. You can only make it play at its original volume for all listeners, and remove spatialization so it is heard everywhere equally. Summary:
- Your trigger logic is correct for detecting entry/exit. - The actual amplification must be handled on all clients, not just the local one. - Use a synced property or event to notify all clients to update the
Normcore’s
RealtimeAvatarVoice
uses Unity’s AudioSource
for playback, and you can only adjust the playback volume and spatialization locally on each client. You cannot amplify the microphone input or send a "louder" stream over the network. The maximum volume is capped at the original audio level, and you can only make it play at full volume for all listeners by setting the AudioSource
's volume
to 1.0 and spatialBlend
to 0 (making it 2D/non-spatialized) on every client that should hear the amplified voice. This must be done on all clients, not just the speaker’s client, since each client controls their own playback settings for remote voices Voice Chat Reference.
2. How to Apply Amplification:Your
VoiceAmplifierSync
component should, on all clients, find the AudioSource
attached to the RealtimeAvatarVoice
of the target player and set:
This will make the voice non-positional and as loud as possible for everyone in the trigger zone.
3. Synchronization:You need to ensure that the amplification state is synchronized across all clients. This typically means using a synced property (e.g., a value in a
RealtimeModel
) so that when a player enters/exits the trigger, all clients update the playback settings for that player’s voice. Simply calling SetAmplified(true)
on the local client will not affect how other clients hear the voice.
4. No True "Amplification":You cannot make the voice louder than the original microphone input. You can only make it play at its original volume for all listeners, and remove spatialization so it is heard everywhere equally. Summary:
- Your trigger logic is correct for detecting entry/exit. - The actual amplification must be handled on all clients, not just the local one. - Use a synced property or event to notify all clients to update the
AudioSource
settings for the target avatar.
- You cannot exceed the original microphone volume, only maximize playback and remove spatialization.
If you need more advanced behavior (like a true PA system), this is not directly supported by Normcore’s built-in components, and you would need to implement a custom solution.
For more details, see the Voice Chat documentation and Spatialization FAQ.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@918869683929768036> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Any other suggestions I just need for the voice to project throughout the entire scene so the crowd can hear the person on stage
audioSource.spatialBlend = 0f; or linear drop off or setting a higher min distance is the way to go