I have a bunch of AAC (.m4a
) audio files that need to be normalized, and was hoping to find a way to do it with a simple python script using some package.
I found this thread on superuser where someone has written an ffmpeg
command-line utility in python, and it works well, but was wondering if there is some currently available python package with a pip install
that would be up to the task.
Normalizing audio is an effective strategy for making samples, and vocal takes more consistent in volume before/during mixing and even as a method for mastering to bring a group of final music, podcast, or television mixes up to a consistent level.
from pydub import AudioSegment, effects
rawsound = AudioSegment.from_file("./input.m4a", "m4a")
normalizedsound = effects.normalize(rawsound)
normalizedsound.export("./output.wav", format="wav")
Before:
After:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With