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.
This exercise is part of the course
Spoken Language Processing in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
file_with_static = AudioSegment.from_file(____)
# Cut the first 3-seconds of static off
file_without_static = file_with_static[____:]