Amplify Meta Lip Sync
I need to amplify the audiosource on the Meta Avatar using ontriggerenter. How can I access that Audiosource because I need this feature for the app to amplify the AudioSource on the Avatar Head.


OnTriggerEnterusing UnityEngine;
using Normal.Realtime;
public class AmplifyAvatarAudio : MonoBehaviour {
private RealtimeAvatarVoice _avatarVoice;
private AudioSource _audioSource;
void Awake() {
// Find the RealtimeAvatarVoice component (assumes it's on the same GameObject or child)
_avatarVoice = GetComponentInChildren<RealtimeAvatarVoice>();
if (_avatarVoice != null) {
// Get the AudioSource used by RealtimeAvatarVoice
_audioSource = _avatarVoice.GetComponent<AudioSource>();
}
}
void OnTriggerEnter(Collider other) {
if (_audioSource != null) {
// Amplify the volume (e.g., double it, but clamp to 1.0)
_audioSource.volume = Mathf.Clamp(_audioSource.volume * 2f, 0f, 1f);
}
}
}using UnityEngine;
using Normal.Realtime;
public class AmplifyOnStage : MonoBehaviour {
private RealtimeAvatarVoice _avatarVoice;
private AudioSource _audioSource;
void Awake() {
_avatarVoice = GetComponentInChildren<RealtimeAvatarVoice>();
if (_avatarVoice != null) {
_audioSource = _avatarVoice.GetComponent<AudioSource>();
}
}
void OnTriggerEnter(Collider other) {
if (other.CompareTag("Stage") && _audioSource != null) {
_audioSource.volume = Mathf.Clamp(_audioSource.volume * 2f, 0f, 1f);
}
}
}