Get current sound level

I want to tie a visual effect to the level of current sound from a speaker talking. Is there a way to get a 0 to 1 float for how loud the audio source is? Thank you.

GetOutputData on the audiosource

that gives you an array of volumes

You can then sum and average a block of these to get a “current” volume
You will likely also have to apply smoothing before using it for something like visuals

1 Like