speakerbox
speakerbox copied to clipboard
`AudioSegment.from_file` is not restricted to WAV files
Feature Description
In preprocess.py
, you use AudioSegment.from_file
to load the audio files. According to definition of this function, it seems it accepts a bunch of file formats.
but at the previous line, you restrict the user to wav files for ... in label_dir.glob("*.wav")
Is there a reason to that? Mp3/ogg/etc. files would be useful, as they take less place on the disk.
Use Case
Basic preprocess
then train
, as in README.
Solution
replace .glob('*wav')
by a list of formats pydub accepts. I didn't find a list yet, but the implementation of from_file
gives us some hints of the formats accepted.