soroushmehr / sampleRNN_ICLR2017

SampleRNN: An Unconditional End-to-End Neural Audio Generation Model
https://arxiv.org/abs/1612.07837
MIT License
534 stars 140 forks source link

preprocessing data #18

Open zhang-jian opened 7 years ago

zhang-jian commented 7 years ago

Hi, I think this line should be: os.system('ffmpeg -ss {} -t 8 -i {}/preprocess_all_audio.wav -ac 1 -ab 16k -ar 16000 {}/p{}.flac'.format(i*8, OUTPUT_DIR, OUTPUT_DIR, i))

Otherwise, you only use the first (int(length)//8 - 1) + 8 seconds of your training data?

liamgilbey commented 6 years ago

@zhang-jian I think you are right - a lot of the training data is lost this way. Another option might be changing this line to: for i in xrange(int(length) - 1): This will still generate overlapping 8 second samples, but allow the entire training set to be used.