Skip to content

8. Other Functionalities

Theodoros Giannakopoulos edited this page Feb 8, 2015 · 4 revisions

Batch-convert Mp3 to Wav

Function convertDirMP3ToWav(dirName, Fs, nC, useMp3TagsAsName = False) converts all MP3 files of folder dirName to WAV files using the provided sampling rate (second argument) and number of channels (third argument). If the final argument (useMp3TagsAsName) is set to True then the output WAV files are named by the MP3-tags (artist and song title), otherwise the MP3 filename is used (with the .wav extension of course)

Command-line use example

python audioAnalysis.py -dirMp3toWAV data/beat/ 16000 1

Clone this wiki locally