Datasets:
Corrupted files: soundfile loading errors
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)
@agkphysics
@lelando
I downloaded all the files, unzipped them, and ran the find . -type f | wc -l command in the audio directory. The result was 1774615, which is a little different from the 2.1 million mentioned in the AudioSet article. Is that right? Thanks!
@zuowanbushiwo Yes. As mentioned here: https://huggingface.co./datasets/agkphysics/AudioSet#other-known-limitations, some of the original videos were no longer available at the time of download, so there are fewer audio files than in the original AudioSet from 2017.
Thank you very much for your reply. Do you know where I can download the complete version? I am currently working on the DCASE Sound Event Detection task and found that the missing files are relatively large. Thank you! @agkphysics
@zuowanbushiwo One of the reasons I uploaded here was because I couldn't find the full dataset hosted anywhere else.
@agkphysics thanks,I know .