Corrupted files: soundfile loading errors

#3
by lrauch - opened

Hi, thank you for adding this dataset to Hugging Face!

While working with the balanced train and test datasets, I encountered an issue with Hugging Face’s audio decoding using soundfile. Three files failed to load, specifically:

  • Train: indices 15,759 and 17,532
  • Test: index 6,182

After manually removing these files, everything loaded without any problems. I haven’t yet tested the unbalanced dataset. Could these files be corrupted, or is there another issue causing this?

@lrauch What filenames fail, and which tar files are they in?

Not OP but, I am seeing a (couple? few?) failures in bal_train, I'll see if I can get a filename, iirc one was in bal_train07.tar.... I spent some time looking into it and it seems like this is a long standing issue where essentially libsndfile maintainers contend that there is an issue where byte in a .flac can violate some expected condition. apparently flac either doesnt acknowledge or disagrees. The exception message says something to the effect of "psf_fseek() failed" If anyone else runs into this you can work around it by (this assumes python):

  • moving your loop to a function that accepts your dataset as an arg
  • initializing an int (ex: curr_iter) outside the loop and incrementing it on every successful iteration (tracking current dataset index)
  • putting the loop inside a try:/except soundfile.LibsndfileError:.
  • On except: recursively call the same function, passing dataset.skip(curr_iter + 2)

Sign up or log in to comment