Procedural LipSync using FMOD - need help to get value of volume

Hello fellas,
I want to make simple lipsync, based on audio volume. I’ve made something like this based on unity’s audio source earlier, but I have no idea how to achieve this effect using fmod.
For starters, is there any way to get value of current volume, each frame from specific emitter, that is playing event?

This is what I made before with audio source:

Hi, try to side chain parameter with speech event volume (before master so you’ll be able to change voice volume and not affecting lip sync). Then get this parameter in you game and attach it to lipsync.
Hope you’ll find it usefull


Thanks bro, this is exactly what I were looking for:)

I’ve got another question, might be a bit noobish - how to get parameter value from event? I’ve set parameter “Volume” on event, that is modulated by sidechain. In preview in FMOD editor works like a dream, but inside Unity, when I try to get this parameter I get value of 0.
This is piece of my code:

private IEnumerator Lipsync(StudioEventEmitter emitter)
    float duration = 0;
    float volume = 0;
    emitter.Event = _speechEvent;

    while (duration < 3)
        emitter.EventInstance.getParameterByName("Volume", out volume);

        duration += Time.deltaTime;
        yield return new WaitForEndOfFrame();

getParameterByName has two out parameters: value which is the value as set from the public API (eg. from calling setParameter...) and finalValue which is the end result of the parameter after applying adjustments due to automation, modulation, seek speed, and parameter velocity.

1 Like