Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Backend "sox_io" is not one of available backends: ['soundfile']. #90

Closed
vitacon opened this issue Jul 11, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@vitacon
Copy link

vitacon commented Jul 11, 2021

🐛 Bug

I am trying to run umx in Windows 10 64 + Anaconda 3.
The installation ("pip install openunmix") seemed to pass without any problem but "umx anyfile.wav" failed:

(base) C:\Users\Vita\audio-separation\open-unmix-2021>umx nakonci.wav
Traceback (most recent call last):
  File "c:\users\vita\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\vita\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Vita\Anaconda3\Scripts\umx.exe\__main__.py", line 9, in <module>
  File "c:\users\vita\anaconda3\lib\site-packages\openunmix\cli.py", line 118, in separate
    torchaudio.set_audio_backend(args.audio_backend)
  File "c:\users\vita\anaconda3\lib\site-packages\torchaudio\backend\utils.py", line 44, in set_audio_backend
    f'Backend "{backend}" is not one of '
RuntimeError: Backend "sox_io" is not one of available backends: ['soundfile'].

The strange thing was that I got the same error message with full path to the file and even with a non-existing file so it seemed umx could not even load the input file.

Then I noticed this:
Note that we support all files that can be read by torchaudio, depending on the set backend (either soundfile (libsndfile) or sox).
Adding "--audio-backend sox_io" resulted in the same error message, but "--audio-backend soundfile" finally made it work.
Maybe the default setting should change...?

@faroit
Copy link
Member

faroit commented Jul 15, 2021

@vitacon thanks for opening an issue. It looks like this is a torchaudio issue:

Their documentation states that

  • “sox_io” (default on Linux/macOS)
  • “soundfile” (default on Windows)

now, in openunmix I set sox_io as the default for all systems and I guess it would be better to just let torchaudio select their default and allow openunmix to override it if necessary....

@faroit faroit added the bug Something isn't working label Jul 15, 2021
@faroit faroit self-assigned this Jul 15, 2021
@vitacon
Copy link
Author

vitacon commented Jul 15, 2021

I guess it would be better to just let torchaudio select their default

Sounds good. Thanks! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants