Closed shoaibahmadse closed 1 year ago
I think the audio path is not correct, make sure they are in one dir with wav file.
and the command for training:
!python3 /content/CMGAN/src/train.py --data_dir /content/dataset/ --batch_size 4
But the error remain same
I think your train/clean directory has a file named .ipynb_checkpoints. you can either delete this file or filter this file in dataset.py. Add a condition with if '.wav' in file_path:
Original Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/CMGAN/src/data/dataloader.py", line 25, in getitem
cleands, = torchaudio.load(clean_file)
File "/usr/local/lib/python3.8/dist-packages/torchaudio/backend/sox_io_backend.py", line 152, in load
return torch.ops.torchaudio.sox_io_load_audio_file(
RuntimeError: Error loading audio file: failed to open file /content/train/clean/.ipynb_checkpoints