deezer / spleeter

Deezer source separation library including pretrained models.
https://research.deezer.com/projects/spleeter.html
MIT License
25.71k stars 2.81k forks source link

[Bug] The accompaniment.wav and vocals.wav files have not changed #817

Open Ice-Hazymoon opened 1 year ago

Ice-Hazymoon commented 1 year ago

Description

I followed the steps in the readme to install and tried to separate the audio_example.mp3 file, but the output file is always the same as audio_example.mp3. I don't know if my model is downloaded correctly, I tried to download it many times without any error output

Step to reproduce

conda install -c conda-forge ffmpeg libsndfile
pip install spleeter
wget https://github.com/deezer/spleeter/raw/master/audio_example.mp3
$ spleeter separate -o output/ audio_example.mp3
INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz
INFO:spleeter:Validating archive checksum
INFO:spleeter:Extracting downloaded 2stems archive
INFO:spleeter:2stems model file(s) extracted
INFO:spleeter:File output/audio_example/vocals.wav written succesfully
INFO:spleeter:File output/audio_example/accompaniment.wav written succesfully
$ ls -lh ~/pretrained_models/2stems
total 76M
-rw-rw-r-- 1 ubuntu ubuntu   67 Oct 24  2019 checkpoint
-rw-rw-r-- 1 ubuntu ubuntu  75M Oct 24  2019 model.data-00000-of-00001
-rw-rw-r-- 1 ubuntu ubuntu 5.2K Oct 24  2019 model.index
-rw-rw-r-- 1 ubuntu ubuntu 787K Oct 24  2019 model.meta
$ ls -lh ~/output/audio_example    
total 3.7M
-rw-rw-r-- 1 ubuntu ubuntu 1.9M Jan  8 17:50 accompaniment.wav
-rw-rw-r-- 1 ubuntu ubuntu 1.9M Jan  8 17:50 vocals.wav
$ nvidia-smi
Sun Jan  8 17:54:32 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.102.04   Driver Version: 450.102.04   CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla V100-SXM2...  On   | 00000000:00:08.0 Off |                    0 |
| N/A   38C    P0    47W / 300W |   6800MiB / 32510MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A   3391742      C   python                           3405MiB |
|    0   N/A  N/A   3392629      C   python                           3393MiB |
+-----------------------------------------------------------------------------+
$ ffmpeg -v
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
  configuration: --prefix=/tmp/build/80754af9/ffmpeg_1587154242452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho --cc=/tmp/build/80754af9/ffmpeg_1587154242452/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-avresample --enable-gmp --enable-hardcoded-tables --enable-libfreetype --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --disable-nonfree --enable-gpl --enable-gnutls --disable-openssl --enable-libopenh264 --enable-libx264
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
bendanzzc commented 1 year ago

have the same question

I use the pytorch version and it works

VincentHu19 commented 10 months ago

For Chinese Mainland users

This is a network problem, most of the time the pre-trained model cannot be downloaded automatically, and the problem occurs when the program continues to run without the pre-trained model. Solutions (take 2stem as an example) :

  1. download https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz

  2. create folder /spleeter-master/pretrained_models/2stems

  3. Unzip 2stems.tar.gz to the folder in step 2

Now it's alright to use

<中国大陆用户请参考> 这是一个网络问题,大多数情况下无法自动下载预训练模型,而程序在没有预训练模型的情况下继续运行,就会出现这个问题。解决方法(以2stem为例): 1,自行下载 https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz 2,新建文件夹 /spleeter-master/pretrained_models/2stems 3,将2stems.tar.gz解压到步骤2的文件夹中 然后就可以正常运行了

Ice-Hazymoon commented 10 months ago

I checked the 2stems directory , I think the model should be fine.

$ ls -lh ~/pretrained_models/2stems
total 76M
-rw-rw-r-- 1 ubuntu ubuntu   67 Oct 24  2019 checkpoint
-rw-rw-r-- 1 ubuntu ubuntu  75M Oct 24  2019 model.data-00000-of-00001
-rw-rw-r-- 1 ubuntu ubuntu 5.2K Oct 24  2019 model.index
-rw-rw-r-- 1 ubuntu ubuntu 787K Oct 24  2019 model.meta
MrWongXX commented 10 months ago

Same problem,download the 2stems models manually, still not work

KilYep commented 8 months ago

@VincentHu19 "I should save /spleeter-master to which directory? The current directory path for my spleeter is: /usr/local/lib/python3.8/dist-packages/spleeter. Should I save it under this spleeter path?"

Andrew-moon commented 6 months ago

For Chinese Mainland users

This is a network problem, most of the time the pre-trained model cannot be downloaded automatically, and the problem occurs when the program continues to run without the pre-trained model. Solutions (take 2stem as an example) :

  1. download https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz
  2. create folder /spleeter-master/pretrained_models/2stems
  3. Unzip 2stems.tar.gz to the folder in step 2

Now it's alright to use

<中国大陆用户请参考> 这是一个网络问题,大多数情况下无法自动下载预训练模型,而程序在没有预训练模型的情况下继续运行,就会出现这个问题。解决方法(以2stem为例): 1,自行下载 https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz 2,新建文件夹 /spleeter-master/pretrained_models/2stems 3,将2stems.tar.gz解压到步骤2的文件夹中 然后就可以正常运行了

It is useful.😊