I have many audio files @ 22kHz. I want to convert it to 44.1kHz. Since I have many files to convert, I am looking for an easy solution. I came across ffmpegwrapper for python. I installed the package for python. But I couldnt find out the command to resample. Can anyone please help me ? This is the link for the wrapper. https://pypi.python.org/pypi/ffmpegwrapper
$\begingroup$
$\endgroup$
Use SoX to easily convert your files in one go.
Here are some examples:
- https://stackoverflow.com/questions/27264156/sox-batch-process-under-debian
- https://pwnetics.wordpress.com/2011/07/12/bash-one-liner-using-sox-to-batch-convert-the-sampling-frequency-of-audio-files/
Alternatively, if you want to do this from Python, use librosa. An example:
By default, librosa will resample the signal to 22050Hz.
You can change this behavior by saying:
librosa.load(audio_path, sr=44100)
to resample at 44.1KHz, or
librosa.load(audio_path, sr=None)
to disable resampling.