An audio processing workflow
You've seen how to import and manipulate a single audio file using PyDub. But what if you had a folder with multiple audio files you needed to convert?
In this exercise we'll use PyDub to format a folder of files to be ready to use with speech_recognition.
You've found your customer call files all have 3-seconds of static at the start and are quieter than they could be.
To fix this, we'll use PyDub to cut the static, increase the sound level and convert them to the .wav extension.
You can listen to an unformatted example here.
Deze oefening maakt deel uit van de cursus
Spoken Language Processing in Python
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
file_with_static = AudioSegment.from_file(____)
# Cut the first 3-seconds of static off
file_without_static = file_with_static[____:]