FaSNet-TAC-PyTorch icon indicating copy to clipboard operation
FaSNet-TAC-PyTorch copied to clipboard

Training fails due to incorrect ranges of filenames

Open polariton opened this issue 3 years ago • 1 comments

Hello,

I am trying to use your model as a frontend for speaker separation. The data was generated properly, but training fails due to request of non-existing filenames. The training data for 6 mics contains the directories from "sample16001" to "sample20000", but the train.py script looks the files in the paths like "6mic/sample12628" and "6mic/sample5779", which do not exist. Could you please give a hint, where to fix the ranges of directories for training data? See the complete error messages below.

/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/librosa/core/audio.py:165: UserWarning: PySoundFile failed. Trying audioread instead. warnings.warn("PySoundFile failed. Trying audioread instead.") Traceback (most recent call last): File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/librosa/core/audio.py", line 149, in load with sf.SoundFile(path) as sf_desc: File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/soundfile.py", line 629, in init self._file = self._open(file, mode_int, closefd) File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/soundfile.py", line 1184, in _open "Error opening {0!r}: ".format(self.name)) File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/soundfile.py", line 1357, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace')) RuntimeError: Error opening '/home/stanislav_kruchinin/data/NoisySpeech/MC_Libri_adhoc/train/6mic/sample12628/mixture_mic1.wav': System error.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train.py", line 120, in main(args) File "train.py", line 114, in main solver.train() File "/home/stanislav_kruchinin/src/speech_separation/fasnet_tac_pytorch/solver.py", line 77, in train tr_avg_loss = self._run_one_epoch(epoch) File "/home/stanislav_kruchinin/src/speech_separation/fasnet_tac_pytorch/solver.py", line 150, in _run_one_epoch for i, (data) in enumerate(data_loader): File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/torch/utils/data/dataloader.py", line 521, in next data = self._next_data() File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/torch/utils/data/dataloader.py", line 561, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 52, in fetch return self.collate_fn(data) File "/home/stanislav_kruchinin/src/speech_separation/fasnet_tac_pytorch/data.py", line 108, in _collate_fn mix, _ = librosa.load(mix_path, sr) File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/librosa/core/audio.py", line 166, in load y, sr_native = __audioread_load(path, offset, duration, dtype) File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/librosa/core/audio.py", line 190, in __audioread_load with audioread.audio_open(path) as input_file: File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/audioread/init.py", line 111, in audio_open return BackendClass(path) File "/home/stanislav_kruchinin/venv/pytorch/lib64/python3.6/site-packages/audioread/rawread.py", line 62, in init self._fh = open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/home/stanislav_kruchinin/data/NoisySpeech/MC_Libri_adhoc/train/6mic/sample12628/mixture_mic1.wav'

polariton avatar Nov 18 '21 16:11 polariton

obviously your data directory is wrong

wxystudio avatar Mar 08 '22 06:03 wxystudio