slp-rl / aero

This repo contains the official PyTorch implementation of "Audio Super Resolution in the Spectral Domain" (ICASSP 2023)
MIT License
199 stars 26 forks source link

soundfile.LibsndfileError: <unprintable LibsndfileError object> Error in train.py #21

Closed yalcincenik closed 10 months ago

yalcincenik commented 10 months ago

I am using Windows. I have clonned the github repo and in the AERO\lib\site-packages\torch_utils.py function reraise gives an soundfile.LibsndfileError: error. How can I fixed it?

yalcincenik commented 10 months ago

Here is how it looks like. Traceback (most recent call last): File "C:\Users\yalcincenik\aero\train.py", line 136, in main _main(args) File "C:\Users\yalcincenik\aero\train.py", line 126, in _main run(args) File "C:\Users\yalcincenik\aero\train.py", line 100, in run solver.train() File "C:\Users\yalcincenik\aero\src\solver.py", line 162, in train losses = self._run_one_epoch(epoch) File "C:\Users\yalcincenik\aero\src\solver.py", line 292, in _run_one_epoch for i, data in enumerate(logprog): File "C:\Users\yalcincenik\aero\src\utils.py", line 107, in next value = next(self._iterator) File "C:\Users\yalcincenik\anaconda3\envs\AERO\lib\site-packages\torch\utils\data\dataloader.py", line 681, in next data = self._next_data() File "C:\Users\yalcincenik\anaconda3\envs\AERO\lib\site-packages\torch\utils\data\dataloader.py", line 1376, in _next_data return self._process_data(data) File "C:\Users\yalcincenik\anaconda3\envs\AERO\lib\site-packages\torch\utils\data\dataloader.py", line 1402, in _process_data data.reraise() File "C:\Users\yalcincenik\anaconda3\envs\AERO\lib\site-packages\torch_utils.py", line 462, in reraise raise exception soundfile.LibsndfileError:

yalcincenik commented 10 months ago

@m-mandel

m-mandel commented 10 months ago

Hi, Thanks for using our code. I'm not exactly sure what the problem is, but it might be that the format of your underlying data is not as expected. Make sure it is the correct format and the correct dimensions (wav, mono, either 2-D or 1-D per sample - I don't exactly recall).

Good luck and keep us updated.

yalcincenik commented 10 months ago

Thanks for responses. I used in Windows11, but there sox library can be a problem. Do you remember which OS you implement it? @m-mandel

yalcincenik commented 10 months ago

The problem is related to Windows. In Linux, sound libraries sox and soundfile work correctly. We can close the issue.

m-mandel commented 10 months ago

Good to hear. Thanks for the update. Closing issue.