GRUV
GRUV copied to clipboard
lame --resample only supported for encoding
If nn_params['sampling_frequency']
is changed in config/nn_config.py
(e.g. from 44100 to 8000) GRUV attempts to use lame to decode mp3 to wav with the specified sample frequency via the lame --resample option.
Unfortunately (as of lame version 3.99.5 published 2011) the --resample option is completely ignored in combination with the --decode option so no resampling is applied.
Consequently you might end up with a 44.1kHz wav file being used to train a model, when elsewhere an 8kHz sampling rate is assumed. This really messes up training and sequence generation.
Fortunately this is easily fixed in line 30 of data_utils/parse_files.py
:
Old version:
cmd = 'lame -a -m m {0} {1}'.format(quote(filename), quote(filename_tmp))
New version:
cmd = 'lame -a -m m {0} {1} --resample {2}'.format(quote(filename), quote(filename_tmp), sample_freq_str)