ppatpk
ppatpk

Reputation: 43

Get VU meter value from audio using Python

I found many meanings of the Volume Unit meter (VU meter). For example, the average of loudness of sound, the average of frequencies of sound, and the average of power in dB scale.

I read audio by using AudioSegment and segmented an audio sound into small windows. Then I got an array of values for each window (I guess that the values that I got are amplitudes).

from pydub import AudioSegment
from pydub.utils import get_array_type

#def vu(arr):
#
#    return vu_value

sound = AudioSegment.from_file(fullfilename) #also read file
# stereo signal to two mono signal for left and right channel
split_sound = sound.split_to_mono()
left_channel = split_sound[0]
right_channel = split_sound[1]
left_channel = np.array(left_channel.get_array_of_samples())
right_channel = np.array(right_channel.get_array_of_samples())

# print(vu(left_channel))

I would like to know the exact meaning of the VU meter and how to get VU value for each window (ex. formula). I also confused between VU meter, Peak Programme Meter (PPM), and RMS. If anyone knows the answer, please help me.

Thank you

Upvotes: 0

Views: 2169

Answers (0)

Related Questions