My Mandarin teacher gave me a radio recording of someone reading Harry Potter but the problem is it is very loud - painfully so. It sounds like the microphone is in the person's mouth the whole time. As a hobby project I thought it would be neat to try to fix it. I wrote a program to visualize it this morning based on stuff I read about online and this is the output:
I tried normalizing it with the following code:
from pydub import AudioSegment
# Set target dBFS level
target_dBFS = -24
# Load audio file
audio = AudioSegment.from_file('../1哈利波特与魔法石/trimmed_audio/1_HP-01-[AudioTrimmer.com].mp3', format="mp3")
# Normalize audio to target dBFS level
normalized_audio = audio.normalize(target_dBFS)
# Write normalized audio to new file
normalized_audio.export("normalized_audiofile.mp3", format="mp3")
to disastrous effect . Running the output through my visualizer gives me:
What I'm trying to figure out is:
- Is it feasible to reduce the volume to below the consumer level audio mark (-16dBFS)?
- What algorithm should I be using to approach the problem? I thought it would be normalize but it seems like that may not be the case.