facebookresearch / demucs

Code for the paper Hybrid Spectrogram and Waveform Source Separation
MIT License
8.27k stars 1.05k forks source link

UserWarning: No audio backend is available. warnings.warn('No audio backend is available.') #201

Open taleno503 opened 3 years ago

taleno503 commented 3 years ago

(demucs) PS E:\music_ai\demucs> python3.exe -m demucs.separate --mp3 E:\music_ai\demucs\audios\p1\v.mp3 --mp3-bitrate 256 C:\Users\taleno\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\torchaudio\backend\utils.py:67: UserWarning: No audio backend is available. warnings.warn('No audio backend is available.') Separated tracks will be stored in E:\music_ai\demucs\separated\demucs_quantized Separating track E:\music_ai\demucs\audios\p1\v.mp3 | 0.0/270.0 [00:00<?, ?seconds/s] 11%|████████
| 30.0/270.0 [00:27<03:36, 1.11seconds/s] 22%|████████████████▏
| 60.0/270.0 [00:54<03:12, 1.09seconds/s] 33%|████████████████████████▎
| 90.0/270.0 [01:21<02:41, 1.100%████████████████████████████████████████████████████████████████████████| 270.0/270.0 [03:48<00:00, 1.18seconds/s]/s]econds/s] Failed to call lame encoder. Maybe it is not installed? On windows, run python.exe -m pip install -U lameenc, on OSX/Linux, run python3 -m pip install -U lameenc, then try again. (demucs) PS E:\music_ai\demucs>

taleno503 commented 3 years ago

I have this problem that it does not save the files....i have run python3 -m pip install -U lameenc but not work.. helpme please

adefossez commented 3 years ago

Can you run python3.exe -c "import lameenc" and see if you get an error message?

Did python3 -m pip install -U lameenc succeed ?

Yumeo0 commented 2 years ago

I have a very similar error. This happens after running all 4 cycles. File "c:\users\username\anaconda3\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\username\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\username\anaconda3\Scripts\demucs.exe\__main__.py", line 7, in <module> File "c:\users\username\anaconda3\lib\site-packages\demucs\separate.py", line 132, in main save_audio(source, stem, model.samplerate) File "c:\users\username\anaconda3\lib\site-packages\demucs\audio.py", line 247, in save_audio ta.save(str(path), wav, sample_rate=samplerate) File "c:\users\username\anaconda3\lib\site-packages\torchaudio\backend\no_backend.py", line 18, in save raise RuntimeError('No audio I/O backend is available.') RuntimeError: No audio I/O backend is available.

Ok I fixed it. It was just this simple: python.exe -m pip install PySoundFile. It was a problem with torchaudio.

CarlGao4 commented 2 years ago

The program uses torchaudio to save file, and torchaudio uses module PySoundFile. You can just pip install PySoundFile. I don't know where does the help message lameenc comes from.