Giter VIP home page Giter VIP logo

spleeter's Introduction

Github actions PyPI - Python Version PyPI version Conda Docker Pulls Open In Colab Gitter chat status

⚠️ Spleeter 2.1.0 release introduces some breaking changes, including new CLI option naming for input, and the drop of dedicated GPU package. Please read CHANGELOG for more details.

About

Spleeter is Deezer source separation library with pretrained models written in Python and uses Tensorflow. It makes it easy to train source separation model (assuming you have a dataset of isolated sources), and provides already trained state of the art model for performing various flavour of separation :

  • Vocals (singing voice) / accompaniment separation (2 stems)
  • Vocals / drums / bass / other separation (4 stems)
  • Vocals / drums / bass / piano / other separation (5 stems)

2 stems and 4 stems models have high performances on the musdb dataset. Spleeter is also very fast as it can perform separation of audio files to 4 stems 100x faster than real-time when run on a GPU.

We designed Spleeter so you can use it straight from command line as well as directly in your own development pipeline as a Python library. It can be installed with pip or be used with Docker.

Projects and Softwares using Spleeter

Since it's been released, there are multiple forks exposing Spleeter through either a Guided User Interface (GUI) or a standalone free or paying website. Please note that we do not host, maintain or directly support any of these initiatives.

That being said, many cool projects have been built on top of ours. Notably the porting to the Ableton Live ecosystem through the Spleeter 4 Max project.

Spleeter pre-trained models have also been used by professionnal audio softwares. Here's a non-exhaustive list:

🆕 Spleeter is a baseline in the ongoing Music Demixing Challenge!

Spleeter Pro (Commercial version)

Check out our commercial version : Spleeter Pro. Benefit from our expertise for precise audio separation, faster processing speeds, and dedicated professional support.

Quick start

Want to try it out but don't want to install anything ? We have set up a Google Colab.

Ready to dig into it ? In a few lines you can install Spleeter and separate the vocal and accompaniment parts from an example audio file. You need first to install ffmpeg and libsndfile. It can be done on most platform using Conda:

# install dependencies using conda
conda install -c conda-forge ffmpeg libsndfile
# install spleeter with pip
pip install spleeter
# download an example audio file (if you don't have wget, use another tool for downloading)
wget https://github.com/deezer/spleeter/raw/master/audio_example.mp3
# separate the example audio into two components
spleeter separate -p spleeter:2stems -o output audio_example.mp3

⚠️ Note that we no longer recommend using conda for installing spleeter.

⚠️ There are known issues with Apple M1 chips, mostly due to TensorFlow compatibility. Until these are fixed, you can use this workaround.

You should get two separated audio files (vocals.wav and accompaniment.wav) in the output/audio_example folder.

For a detailed documentation, please check the repository wiki

Development and Testing

This project is managed using Poetry, to run test suite you can execute the following set of commands:

# Clone spleeter repository
git clone https://github.com/Deezer/spleeter && cd spleeter
# Install poetry
pip install poetry
# Install spleeter dependencies
poetry install
# Run unit test suite
poetry run pytest tests/

Reference

If you use Spleeter in your work, please cite:

@article{spleeter2020,
  doi = {10.21105/joss.02154},
  url = {https://doi.org/10.21105/joss.02154},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {50},
  pages = {2154},
  author = {Romain Hennequin and Anis Khlif and Felix Voituret and Manuel Moussallam},
  title = {Spleeter: a fast and efficient music source separation tool with pre-trained models},
  journal = {Journal of Open Source Software},
  note = {Deezer Research}
}

License

The code of Spleeter is MIT-licensed.

Disclaimer

If you plan to use Spleeter on copyrighted material, make sure you get proper authorization from right owners beforehand.

Troubleshooting

Spleeter is a complex piece of software and although we continously try to improve and test it you may encounter unexpected issues running it. If that's the case please check the FAQ page first as well as the list of currently open issues

Windows users

It appears that sometimes the shortcut command spleeter does not work properly on windows. This is a known issue that we will hopefully fix soon. In the meantime replace spleeter separate by python -m spleeter separate in command line and it should work.

Contributing

If you would like to participate in the development of Spleeter you are more than welcome to do so. Don't hesitate to throw us a pull request and we'll do our best to examine it quickly. Please check out our guidelines first.

Note

This repository include a demo audio file audio_example.mp3 which is an excerpt from Slow Motion Dream by Steven M Bryant (c) copyright 2011 Licensed under a Creative Commons Attribution (3.0) license Ft: CSoul,Alex Beroza & Robert Siekawitch

spleeter's People

Contributors

aliakbar09a avatar alreadytaikeune avatar d-dawg78 avatar doky avatar faylixe avatar johnwmillr avatar marshalium avatar martin1994 avatar mmoussallam avatar robert-moore avatar romi1502 avatar useername avatar valrus avatar yusukegoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spleeter's Issues

Issues when fine tune model

Hi, thanks for sharing your nice work!
I have a question when I tried to fine-tune your model on my dataset.
I feed your released pertained model to the estimator and trained the model with my dataset.
However, the model did not find the parameters for "../../Adam" in the checkpoint.
Do you have any idea about this problem ?

ffprobe Error

Description

I downloaded homebrew and ffmpeg to run the code. Works fine with the audio_example given, but when I try to use another song from my library I get an ffprobe error. Also I'm putting this song in the same directory as the audio_example.mp3.

Step to reproduce

  1. Installed using
    git clone https://github.com/Deezer/spleeter conda env create -f spleeter/conda/spleeter-cpu.yaml conda activate spleeter-cpu
  2. Run as spleeter separate -i spleeter/Home.mp3 -p spleeter:2stems -o output
  3. Got
    INFO:spleeter:Loading audio b'spleeter/Home.mp3' from 0.0 to 600.0 WARNING:spleeter:ffprobe error (see stderr output for detail) error

Output

The code works fine with the original audio given. This would be the output.

INFO:spleeter:Audio data loaded successfully
INFO:spleeter:File output/audio_example/vocals.wav written
INFO:spleeter:File output/audio_example/accompaniment.wav written

Environment

OS MacOS
Installation type Conda
RAM available 4 GB
Hardware spec CPU

Additional context

[HELP Please!]Successfully installed but can't be used

I used pip to install pip install spleeter pip install spleeter -i https://pypi.doubanio.com/simple`
And I have to use the doubanio mirror because I am in China
But I have successfully installed spleeter:

However! I cannot use it. It always tells me 'system cant find this file '. I am pretty sure that the file path is correct.
After many trials, I still don't know why. Can anybody give me some suggesstions please?
Thanks
image
"系统找不到指定的文件"means that 'ERROR_FILE_NOT_FOUND System can't find the file specificed.'

[Bug] Error running spleeter from python (windows)

Description

I tried to run spleeter from python using the sourcecode below. When calling prediction = separator.separate(waveform) I get an error saying
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: /tmp/serving\temp-b'1573038463'; No such file or directory.

As you can see, the path really looks a bit off for windows. I can only imagine this is because in this file the path is set "linux-like", with forward slashes.

Step to reproduce

  1. Installed using pip install spleeter
  2. Ran it with the following code:
import warnings
# Disabling FeatureWarnings and so on
warnings.filterwarnings('ignore')

from spleeter.separator import Separator
from spleeter.utils.audio.adapter import get_default_audio_adapter

# Using embedded configuration.
separator = Separator("spleeter:2stems")

audio_loader = get_default_audio_adapter()
sample_rate = 44100
waveform, _ = audio_loader.load("audio\kl.mp3", sample_rate=sample_rate)

# Perform the separation :
# Here the program exits with the error
prediction = separator.separate(waveform)

print(prediction)

Output

This is the error I get:

Traceback (most recent call last):
  File ".\main.py", line 17, in <module>
    prediction = separator.separate(waveform)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\spleeter\separator.py", line 85, in separate
    predictor = self._get_predictor()
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\spleeter\separator.py", line 57, in _get_predictor
    self._predictor = to_predictor(estimator)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\spleeter\utils\estimator.py", line 64, in to_predictor
    estimator.export_saved_model(directory, receiver)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 732, in export_saved_model
    strip_default_attrs=True)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 832, in _export_all_saved_models
    builder = saved_model_builder.SavedModelBuilder(temp_export_dir)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 432, in __init__
    super(SavedModelBuilder, self).__init__(export_dir=export_dir)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 104, in __init__
    file_io.recursive_create_dir(self._export_dir)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 438, in recursive_create_dir
    recursive_create_dir_v2(dirname)
  File "C:\Users\NISJ\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 453, in recursive_create_dir_v2
    pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(path))
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: /tmp/serving\temp-b'1573038463'; No such file or directory

Environment

OS Windows
Installation type pip
RAM available 16GB
Hardware spec Intel CPU, internal intel graphics chip

Additional context

not additive sum of components

None of the 3 models with default parameters produce additive sum of the components.
I tested this in Audacity and there is always a difference signal that is like a residual.
Is there a way to modify some parameter for this or this needs to be fixed?

Thank you and awesome work on this framework!

the paper link

I can not find your paper "Spleeter: A Fast And State-of-the Art Music Source Separation Tool With Pre-trained Models". Is that open for user? Can you provide links to the paper? thank you!

[Bug] Spleeter hangs endlessly on "Tears of a Clown"

Description

On this environment, Spleeter hangs endlessly on "Tears of a Clown" and other certain songs. It works for the demo example and a majority of songs, but has an endless loop on some.

The hang is similar whether using the spleeter-cpu or spleeter-gpu activation. The hang is similar whether using 2 stem or 4 stem output. The hang is similar whether using WAV or MP3 input format.

Step to reproduce

git clone https://github.com/Deezer/spleeter
conda env create -f spleeter/conda/spleeter-cpu.yaml
conda env create -f spleeter/conda/spleeter-gpu.yaml

conda activate spleeter-cpu
or
conda activate spleeter-gpu

Output

(spleeter-cpu) E:\git\people\deezer>spleeter separate -i spleeter/spleeter separate -i spleeter/SmokeyRobinsonTheMiracles-2004-Motown1s-17-TearsofaClown.m4a -p spleeter:2stems -o output
INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models\\2stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
  per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x0000017870639240>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
INFO:tensorflow:Calling model_fn.
WARNING:tensorflow:From c:\programdata\miniconda3\envs\spleeter-cpu\lib\site-packages\spleeter\model\functions\unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.

INFO:tensorflow:Apply unet for vocals_spectrogram
INFO:tensorflow:Apply unet for accompaniment_spectrogram
INFO:tensorflow:Done calling model_fn.
WARNING:tensorflow:From c:\programdata\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\ops\array_ops.py:1354: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
INFO:tensorflow:Graph was finalized.
WARNING:tensorflow:From c:\programdata\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
INFO:tensorflow:Restoring parameters from pretrained_models\2stems\model
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
INFO:tensorflow:Loading audio b'spleeter/SmokeyRobinsonTheMiracles-2004-Motown1s-17-TearsofaClown.m4a' from 0.0 to 600.0

Environment

OS Windows 10 64 bit
Installation type Conda
RAM available 32G
Hardware spec CPU is Intel i7-6700K @ 4 GHz / GPU is NVidea GeForce GTX 1070

Additional context

The particular song I used was Smokey Robinson and the Miracles "Tears of a Clown" from the 2004 CD Motown 1s. The song has changing tempo and some flutes and oboes that might make it tough to separate.

Is there any way to enhance the quality of output audio?

I read your Wiki tab, but didn't find is there any way to upgrade the result separations quality (maybe using more power of my pc or something?). Because it sounds like it can produce much more clear sound or am I wrong? Thanks

Future warning 1type

Description

No install issues. No matter which 2,4,5 stem model I use I get this logged. The audio files generate. Just not sure if these warnings are affecting stem quality.

Step to reproduce

Ran:
spleeter separate -i audio_example.mp3 -o audio_output -p spleeter:4stems

Output

(spleeter-cpu) C:\Users\Brandon Harmon\spleeter>spleeter separate -i audio_example.mp3 -o audio_output -p spleeter:4stems
INFO:spleeter:Loading audio b'audio_example.mp3' from 0.0 to 600.0
INFO:spleeter:Audio data loaded successfully
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-3
OMP: Info #213: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #276: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
OMP: Info #156: KMP_AFFINITY: 4 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #191: KMP_AFFINITY: 1 socket x 4 cores/socket x 1 thread/core (4 total cores)
OMP: Info #215: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to socket 0 core 0
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to socket 0 core 1
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to socket 0 core 2
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to socket 0 core 3
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 8944 thread 0 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 7224 thread 2 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 828 thread 1 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 8756 thread 3 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 2296 thread 4 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 9996 thread 5 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 8104 thread 6 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 6236 thread 7 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 2520 thread 8 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 10404 thread 9 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 10268 thread 10 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 4628 thread 11 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 6296 thread 12 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 8300 thread 13 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 10400 thread 15 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 3500 tid 8028 thread 14 bound to OS proc set 2
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\brandon harmon\.conda\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
INFO:spleeter:File audio_output\audio_example\drums.wav written
INFO:spleeter:File audio_output\audio_example\other.wav written
INFO:spleeter:File audio_output\audio_example\vocals.wav written
INFO:spleeter:File audio_output\audio_example\bass.wav written

Environment

OS Windows 10 VM
Installation type Conda /
RAM available XGo
Hardware spec GPU / CPU / etc ...

Additional context

[Discussion] Quality Affected

I really liked the result of this tool, but there is something that bothers me and I hope the developers may be fixing it in the future.

I noticed that in the final file, the frequencies are cut in the spectrogram, which means a loss of quality in the audio, making it more muffled. I hope if possible this will be fixed and it managed to maintain the lossless quality of the file .. this would make the tool excellent!!

Original file:
001

Final file:
002

Example file only generated single stem

Hello! I installed Git and Conda using a method linked below then installed and activated the Conda environment per the instructions in your guide (though I had to perform an additional step priming Conda for the Bash environment to actually use the Activate command).

When running with the example script using the 2stems parameter, I get the separated vocals as a wav file in the output folder, but it does not seem to generate the accompaniment file.

Terminal output

`Matthew@Matthew-PC MINGW64 ~
$ conda activate spleeter-cpu
(spleeter-cpu)
Matthew@Matthew-PC MINGW64 ~
$ spleeter separate -i spleeter/audio_example.mp3 -p spleeter:2stems -o output
INFO:tensorflow:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/2stems.tar.gz
INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models\2stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x000001E7DADDA2E8>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
INFO:tensorflow:Calling model_fn.
WARNING:tensorflow:From c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\spleeter\model\functions\unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.

INFO:tensorflow:Apply unet for vocals_spectrogram
INFO:tensorflow:Apply unet for accompaniment_spectrogram
INFO:tensorflow:Done calling model_fn.
WARNING:tensorflow:From c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\ops\array_ops.py:1354: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
INFO:tensorflow:Graph was finalized.
WARNING:tensorflow:From c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
INFO:tensorflow:Restoring parameters from pretrained_models\2stems\model
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
INFO:tensorflow:Loading audio b'spleeter/audio_example.mp3' from 0.0 to 600.0
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-7
OMP: Info #213: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #276: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
OMP: Info #156: KMP_AFFINITY: 8 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #191: KMP_AFFINITY: 1 socket x 4 cores/socket x 2 threads/core (4 total cores)
OMP: Info #215: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to socket 0 core 0 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to socket 0 core 0 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to socket 0 core 1 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to socket 0 core 1 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to socket 0 core 2 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to socket 0 core 2 thread 1
OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to socket 0 core 3 thread 0
OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to socket 0 core 3 thread 1
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 11752 thread 0 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 4472 thread 1 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 4284 thread 2 bound to OS proc set 4
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 3380 thread 3 bound to OS proc set 6
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 4688 thread 4 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 652 thread 5 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 12860 thread 6 bound to OS proc set 5
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 3492 thread 7 bound to OS proc set 7
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 8212 thread 8 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 12364 thread 9 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 3224 thread 10 bound to OS proc set 4
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 6032 thread 11 bound to OS proc set 6
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 6368 thread 12 bound to OS proc set 1
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 5108 thread 13 bound to OS proc set 3
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 3324 thread 14 bound to OS proc set 5
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 9792 thread 15 bound to OS proc set 7
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 1132 thread 16 bound to OS proc set 0
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 9304 thread 17 bound to OS proc set 2
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 7064 thread 18 bound to OS proc set 4
OMP: Info #251: KMP_AFFINITY: pid 6044 tid 7540 thread 19 bound to OS proc set 6
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
c:\users\matthew\miniconda3\envs\spleeter-cpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])`

Your Setup

In particular:

More info on pretrained models

First, congrats to your release. Glad to have more music separation ready to use :-)

Do you have some more information regarding

  • were the pretrained models just trained on MUSDB18?
  • If not, would the models be still performing as good as state of the art when trained on just MUSDB18?
  • what SDR values could we expect from these models on MUSDB18 test?

[Bug] ValueError: Couldn't find trained model at pretrained_models/2stems.

Description

When I ran the sample with python API, the error was raised. I could not find any pretrained model in this repo either. Do I need to train a model by myself?

Step to reproduce

  1. Installed using pip
  2. Run:
    from spleeter.separator import Separator
    separator = Separator('spleeter:2stems')

    from spleeter.utils.audio.adapter import get_default_audio_adapter
    audio_loader = get_default_audio_adapter()
    sr = 22050
    waveform, _ = audio_loader.load(wav_file, sample_rate=sr)

    prediction = separator.separate(waveform)

The error is raised at the last line.
ValueError: Couldn't find trained model at pretrained_models/2stems.

Environment

OS MacOS 10.14
Installation type pip

[Bug] Command not found

I'm sure this is a user error as I am new to coding but when I try to use I get "command not found". Does this mean it wasn't installed properly?

I installed miniconda for this.

Screen Shot 2019-11-07 at 11 42 46 AM

Thanks for the help!

error trying to run separation

BUG
running this command is not successful in creating the output files & gives messages
spleeter separate -i audio_example.mp3 -o audio_output

produces mutiple messages similar to the following:
c:\users\bryan.conda\envs\spleeter-cpu\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])

Your Setup

windows 10 64

In particular:
miniconda

No output or error log for most song-length input on Ubuntu-for-Windows (WSL)

Description

I have tested about 15 different songs, and only 3 of them produced any output at all. My environment is a little unusual, I'm using spleeter-cpu on WSL (Ubuntu-for-Windows).

I get the "loading audio from 0.0 to 600.0" message and then it grinds for a few minutes consuming all CPU, and then just exits. The contents of "$?" after failure is 0, indicating successful exit (or that the program doesn't properly set result codes). Sometimes only one of the models will produce any output for a given input file. Except for audio_example.mp3, which works as expected, I've yet to have the "[x]stems" model actually produce [x] output files. When there is output, I get 1 or 2 files at most, usually the vocal. I have tried FLACs, WAVs, and mp3s as input.

In response to the FAQ, I have tried chunking my input into 1, 2, and 3 minute chunks. 1 and 2 minutes work, but at 3 minutes, I only get a single vocal file and no accompaniment file.

I have 24gb of RAM on this system, and there is no dmesg log of OOMkilling, so I doubt that it's out-of-memory concerns resulting in no output. Watching the process running in Resource Manager, it uses about 5gb of RAM, and there's multiple gigs of RAM sitting unused.

The output of ulimit does not suggest that my shell is limiting available RAM.

max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
virtual memory          (kbytes, -v) unlimited

Please let me know if there is any debug mode or log that might be helpful in understanding what is happening.

Step to reproduce

  1. spleeter separate -i input/track_length_input_file.mp3 -p spleeter:2stems -o audio_output/
  2. notice there is no output or log

Output

None that is relevant to the issue. If the sub-process is crashing or being killed, it seems like the number one priority to avoid user confusion would be for some part of the stack to generate an error log.

Environment

OS Windows / Linux
Installation type Conda
RAM available 24gb DDR3
Hardware spec i7-2600k

Stopped working.

At the end outputs the same file without separating the voice and accompaniment.

Pip can't find spleeter

I can't install this at all with pip. it always says:

ERROR: Could not find a version that satisfies the requirement spleeter (from versions: none)
ERROR: No matching distribution found for spleeter

whenever I type:

pip install spleeter

Any ideas? This is annoying...

Also, if it means much: I'm using Windows 10 version 1903

Example script doesn't seem to be working.

I'm just following the instructions found in the README, and I was able to successfully run the scripts, and I get two output files, vocals.wav and accompaniment.wav, but both the files sound exactly the same as the original. I am not hearing any difference between the three.

This is exactly what I ran:

git clone https://github.com/Deezer/spleeter
conda env create -f spleeter/conda/spleeter-cpu.yaml
conda activate spleeter-cpu
spleeter separate -i spleeter/audio_example.mp3 -p spleeter:2stems -o output

On the last line I get a bunch of Tensorflow warnings.

INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models/2stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
  per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x13a157eb8>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
INFO:tensorflow:Could not find trained model in model_dir: pretrained_models/2stems, running initialization to predict.
INFO:tensorflow:Calling model_fn.
WARNING:tensorflow:From /anaconda3/envs/spleeter-cpu/lib/python3.7/site-packages/spleeter/model/functions/unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.

INFO:tensorflow:Apply unet for vocals_spectrogram
INFO:tensorflow:Apply unet for accompaniment_spectrogram
INFO:tensorflow:Done calling model_fn.
WARNING:tensorflow:From /anaconda3/envs/spleeter-cpu/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py:1354: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
INFO:tensorflow:Graph was finalized.
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
INFO:tensorflow:Loading audio b'spleeter/audio_example.mp3' from 0.0 to 600.0
INFO:tensorflow:File output/audio_example/vocals.wav written
INFO:tensorflow:File output/audio_example/accompaniment.wav written

I'm running on a mac with Conda.

'FFMPEGProcessAudioAdapter' object is not callable

Description

Report a type error using python API

Step to reproduce

I'm now with the following code:

from spleeter.separator import Separator
separator = Separator('spleeter:2stems')
from spleeter.utils.audio.adapter import get_default_audio_adapter

audio_loader = get_default_audio_adapter()
sr = 22050
waveform, _= audio_loader('my_wave_path', sample_rate = sr)
  1. Installed using pip, and ffmpeg library has also been installed
  2. Got TypeError: 'FFMPEGProcessAudioAdapter' object is not callable

Environment

OS MacOS 10.14
Python 3.6, in Jupyter notebook

image

Train a model with only electric guitar?

Hello there!
I would like to know if it's possible to train a model, but only using the electric guitar files on the MUSDB dataset?

Also, this Spleeter is awesome!

Thank you very much!

Feature Request: Support custom combination of music parts

Currently spleeter supports three flavours of separation:

  • Vocals / accompaniment
  • Vocals / drums / bass / other
  • Vocals / drums / bass / piano / other

It would be really useful to be able to configure which specific parts to separate out.

For my use case, I want to be able to separate only the drums from the rest of the music, so after using spleeter I would get two parts: Vocals + instrumental w/o drums and the drum part.

Right now I can still achieve this with some manual work using the 4stems parameter and using software to merge the vocals, bass, and other parts together.

[Bug] Invalid device ordinal value while setting up XLA_GPU_JIT with spleeter-gpu

Description

While trying to use spleeter gpu implementation installed with conda, I faced execution exceptions.

Step to reproduce

  1. Installed using
git clone https://github.com/Deezer/spleeter
conda env create -f spleeter/conda/spleeter-gpu.yaml
conda activate spleeter-gpu
(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ conda --version
conda 4.6.14
(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ python --version
Python 3.7.3
  1. Run as
(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ mkdir output
(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ file mytest.wav 
mytest.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ spleeter separate -i mytest.wav -p spleeter:2stems -o output

  1. Got
INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models/2stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
  per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f3c8857d2e8>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
INFO:tensorflow:Calling model_fn.
WARNING:tensorflow:From /home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/spleeter/model/functions/unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.

INFO:tensorflow:Apply unet for vocals_spectrogram
INFO:tensorflow:Apply unet for accompaniment_spectrogram
INFO:tensorflow:Done calling model_fn.
WARNING:tensorflow:From /home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py:1354: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
INFO:tensorflow:Graph was finalized.
Traceback (most recent call last):
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/bin/spleeter", line 8, in <module>
    sys.exit(entrypoint())
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/spleeter/__main__.py", line 48, in entrypoint
    main(sys.argv)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/spleeter/__main__.py", line 42, in main
    entrypoint(arguments, params)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/spleeter/commands/separate.py", line 180, in entrypoint
    output_naming=output_naming)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/spleeter/commands/separate.py", line 133, in process_audio
    for sample in prediction:
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 635, in predict
    hooks=all_hooks) as mon_sess:
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 1007, in __init__
    stop_grace_period_secs=stop_grace_period_secs)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 725, in __init__
    self._sess = _RecoverableSession(self._coordinated_creator)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 1200, in __init__
    _WrappedSession.__init__(self, self._create_session())
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 1205, in _create_session
    return self._sess_creator.create_session()
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 871, in create_session
    self.tf_sess = self._session_creator.create_session()
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/monitored_session.py", line 647, in create_session
    init_fn=self._scaffold.init_fn)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/session_manager.py", line 290, in prepare_session
    config=config)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/training/session_manager.py", line 194, in _restore_checkpoint
    sess = session.Session(self._target, graph=self._graph, config=config)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1570, in __init__
    super(Session, self).__init__(target, graph, config=config)
  File "/home/ddoukhan/miniconda3/envs/spleeter-gpu/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 693, in __init__
    self._session = tf_session.TF_NewSessionRef(self._graph._c_graph, opts)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid device ordinal value (1). Valid range is [0, 0].
	while setting up XLA_GPU_JIT device number 1

Output

Share what your terminal says when you run the script (as well as what you would expect).

Environment

OS Ubuntu 16.04
Installation type Conda
RAM available 64 Go
Hardware spec GeForce GTX TITAN X (maxwell architecture)

Additional context

The GPU that can be used to do the computations is inserted on slot 1. Slot 0 cannot be used with tensorflow.

(spleeter-gpu) ddoukhan@lucrate-titan:/tmp$ nvidia-smi -L
GPU 0: GeForce GT 710 (UUID: GPU-17ab4408-c72f-4119-5394-484ff445c66c)
GPU 1: GeForce GTX TITAN X (UUID: GPU-3228b331-6dc2-3944-1c04-15fde2ff42a1)

High frequencies get cut?

Hey there!

Kudos for the project – the results are pretty impressive already!

However, I noticed the default 2-stem model and the 5-stem model seem to cut higher frequencies from the material, like a (Nyquist?) knife really. I ran spleeter on a certain US pop star's song about temperature differences, i.e.

spleeter separate -i hot_n_cold.wav -o . -c wav

where hot_n_cold.wav is a pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s stream, then jury-rigged this A/B test environment in FL Studio where one can compare the original version and the summed stems. You can probably tell from the spectrogram in the below screenshot where I flipped the crossfade slider over to the Spleetered (Spleeted?) version.

Screenshot 2019-11-04 at 10 02 43

The output stems are pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s, so it's not like the file itself is at fault here.

Is this expected? Can this be tuned/changed somehow?

setuptools package version requirement during installation

I got the following error when I was installing spleeter via pip. I didn't had setuptools installed on my system previously. Just to let you know.

ERROR: tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you'll have setuptools 40.8.0 which is incompatible.

vocals file missing? wondering about language support.

I tried using it on some japanese music, it did a pretty good job on the instrumental, but I didn't see any audio file for the vocals. I assume it's english only at the moment and I missed the language support or something in the readme.

[Bug] ffprobe error

INFO:spleeter:Loading audio b'Users/ricky/Downloads/yao.mp3' from 0.0 to 600.0
WARNING:spleeter:ffprobe error (see stderr output for detail)

Wiki page points to missing file for musdb_config.json

Bad link in wiki

The 'train your model section' on the wiki page has a bad link: https://github.com/deezer/spleeter/wiki/2.-Getting-started#train-model

Specifically:

A JSON configuration file such as this one that gathers all parameters needed for training and paths to CSV file.

The current link is: https://github.com/deezer/spleeter/blob/master/configs/mudsb_config.json

The correct link is https://github.com/deezer/spleeter/blob/master/configs/musdb_config.json

Just a flip of the s and d

[Discussion] Output is cut off at about 11kHz

Pretty self explanatory. Is there a way to get an output that's the same quality that's put in? Like I'd like to input a lossless file and get a lossless file out that isn't a bad transcode. I use -c flac and I still get files that are cut off at ~11kHz.
Screen Shot 2019-11-07 at 9 53 38 PM

[Bug] Separation multiprocessing task timeout may be too short

Description

While trying to find a definite cause of missing output files, I found an unrelated issue: when files take longer than the timeout to save, the files will be truncated early (this is very uncommon with the default value of 20s, but possible).

Step to reproduce

I suppose you could reproduce this by generating many artificial disk reads/writes during saving.
Alternatively , you can modify the timeout value at

task.wait(timeout=20)
to a much lower value. Using slower disks or longer files may make it easier to find a suitable value. I personally saw this most often (not always though) with timeouts of ~2 seconds when using the 2stems model on a ~3 minutes long track.

Output

N/A

Environment

OS Windows
Installation type pip
RAM available ~16GB
Hardware spec Ivy Bridge Desktop i5, writing to a single consumer mechanical disk (no RAID)

Additional context

It seems like it may be more appropriate to call close and join on the pool instead of using a fixed timeout, but just increasing the timeout would also work for most cases.

This may also fix #17

How to build docker image

Could you give some guidance in the Readme how to build the docker images?
Thanks a lot, amazing project!

Can this be used as a noise cleansing from conversation audio file?

Hello Team,
Thank you for your effort in building such a fantastic package. This is not a bug , its more of understanding what this package can do.
Please put your suggestion if spleeter can be used for noise cleansing from audio files. As per my understanding / analogy if I consider noise as music and conversation as singer's voice, then can I separate noise from audio conversation using spleeter.
Your input will be helpful.

Error (First separation attempt)

BUG

When trying to run the test audio_output separation???

OUTPUT

(spleeter-cpu) dellan@MBPLate2016wTB4 ~ % spleeter separate -i spleeter/audio_example.mp3 -p spleeter:2stems -o output
Traceback (most recent call last):
File "/opt/miniconda3/bin/spleeter", line 8, in
sys.exit(entrypoint())
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/main.py", line 48, in entrypoint
main(sys.argv)
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/main.py", line 34, in main
enable_logging()
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/utils/logging.py", line 37, in enable_logging
logger = get_logger()
File "/opt/miniconda3/lib/python3.7/site-packages/spleeter/utils/logging.py", line 26, in get_logger
from tensorflow.compat.v1 import logging
File "/opt/miniconda3/lib/python3.7/site-packages/tensorflow/init.py", line 28, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/opt/miniconda3/lib/python3.7/site-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
ImportError: cannot import name 'pywrap_tensorflow' from 'tensorflow.python' (/opt/miniconda3/lib/python3.7/site-packages/tensorflow/python/init.py)

Environment

MacBook Pro (Late 2016 w/ Touch Bar)
macOS Catalina

[Bug] cannot get a output

Description

<WARNING:tensorflow:From d:\anaconda\lib\site-packages\spleeter\model\functions\unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
INFO:tensorflow:Loading audio b'spleeter/test.mp3' from 0.0 to 600.0>

Step to reproduce

spleeter separate -i spleeter/test.mp3 -p spleeter:4stems -o output

Output

tensorflow:Loading audio b'spleeter/test.mp3' from 0.0 to 600.0

Environment

| OS | Windows |
| Installation type | Conda |
| Hardware spec | GPU |

Running Spleeter from Windows

Windows 10 Home (current with updates)
Dell Inspiron 5759
16 gig RAM

Intel HD Graphics 520 (Dell)
4096MB ATI AMD Radeon R5 M335 (Dell)
CrossFire Disabled

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32

Installed using

pip install spleeter

Even just trying to get the help info I get...

D:>spleeter -h
Traceback (most recent call last):
File "c:\python\lib\site-packages\pkg_resources_init_.py", line 583, in build_master
ws.require(requires)
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "c:\python\lib\site-packages\pkg_resources_init_.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (setuptools 40.8.0 (c:\python\lib\site-packages), Requirement.parse('setuptools>=41.0.0'), {'tensorboard'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python\Scripts\spleeter-script.py", line 6, in
from pkg_resources import load_entry_point
File "c:\python\lib\site-packages\pkg_resources_init_.py", line 3191, in
@call_aside
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 3175, in call_aside
f(*args, **kwargs)
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet.build_master()
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 585, in _build_master
return cls.build_from_requirements(requires)
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 598, in build_from_requirements
dists = ws.resolve(reqs, Environment())
File "c:\python\lib\site-packages\pkg_resources_init
.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (setuptools 40.8.0 (c:\python\lib\site-packages), Requirement.parse('setuptools>=41.0.0'), {'tensorboard'})

Struggling on windows

Not a python user generally, so please excuse ignorance. Also, not posted as a bug, as most likely my error. I'm on a windows 10 box.
Installed miniconda ok, and did the

git clone https://github.com/deezer/spleeter
conda env create -f spleeter/conda/spleeter-cpu.yaml
conda activate spleeter-cpu

steps all ok. Last step changes prompt to (spleeter-cpu) d:\mypath
but then when I do

spleeter separate -h

I get
'spleeter' is not recognized as an internal or external command,
operable program or batch file.

Any advice please ?

4stems model not doing anything?

Description

I'm having a great time playing with Spleeter, and things are working great with the 2stems and 5stems models, but the couple tries I've had with the 4stems model results in four files with identical contents.

Step to reproduce

Example usage I've tried:

  1. Installed using conda env create -f spleeter/conda/spleeter-cpu.yaml
  2. Run as spleeter separate -p spleeter:2stems -i ~/Downloads/12\ -\ Step\ into\ a\ World\ \(Rapture\'s\ Delight\).mp3 -o krs2
  3. Works as expected there. However,
  4. Run as spleeter separate -p spleeter:4stems -i ~/Downloads/12\ -\ Step\ into\ a\ World\ \(Rapture\'s\ Delight\).mp3 -o krs4
  5. Got no error, just four identical files.

Output

# 2stems output
# This works as expected:
> diff krs2/12\ -\ Step\ into\ a\ World\ \(Rapture\'s\ Delight\)/{accompaniment,vocals}.wav
Binary files krs2/12 - Step into a World (Rapture's Delight)/accompaniment.wav and krs2/12 - Step into a World (Rapture's Delight)/vocals.wav differ
# 4stems output
# This yields no output:
> diff krs4/12\ -\ Step\ into\ a\ World\ \(Rapture\'s\ Delight\)/{drums,vocals}.wav

Full output of 4stems attempt:

> spleeter separate -p spleeter:4stems -i ~/Downloads/12\ -\ Step\ into\ a\ World\ \(Rapture\'s\ Delight\).mp3 -o krs4
INFO:tensorflow:Using config: {'_model_dir': 'pretrained_models/4stems', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': gpu_options {
  per_process_gpu_memory_fraction: 0.7
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x146d5b4a8>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
INFO:tensorflow:Could not find trained model in model_dir: pretrained_models/4stems, running initialization to predict.
INFO:tensorflow:Calling model_fn.
WARNING:tensorflow:From /miniconda3/envs/spleeter-cpu/lib/python3.7/site-packages/spleeter/model/functions/unet.py:29: The name tf.keras.initializers.he_uniform is deprecated. Please use tf.compat.v1.keras.initializers.he_uniform instead.

INFO:tensorflow:Apply unet for vocals_spectrogram
INFO:tensorflow:Apply unet for drums_spectrogram
INFO:tensorflow:Apply unet for bass_spectrogram
INFO:tensorflow:Apply unet for other_spectrogram
INFO:tensorflow:Done calling model_fn.
WARNING:tensorflow:From /miniconda3/envs/spleeter-cpu/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py:1354: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
INFO:tensorflow:Graph was finalized.
INFO:tensorflow:Running local_init_op.
INFO:tensorflow:Done running local_init_op.
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
INFO:tensorflow:Loading audio b"/Users/galer/Downloads/12 - Step into a World (Rapture's Delight).mp3" from 0.0 to 600.0
INFO:tensorflow:File krs4/12 - Step into a World (Rapture's Delight)/vocals.wav written
INFO:tensorflow:File krs4/12 - Step into a World (Rapture's Delight)/drums.wav written
INFO:tensorflow:File krs4/12 - Step into a World (Rapture's Delight)/bass.wav written
INFO:tensorflow:File krs4/12 - Step into a World (Rapture's Delight)/other.wav written

Environment

2019 Macbook Pro

OS MacOS
Installation type Conda
RAM available several gigs
Hardware spec CPU

Additional context

Great tool though, thanks!

TF warnings

When running the test MP3 through, I saw the following warnings.

WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.int32
WARNING:tensorflow:The dtype of the watched tensor must be floating (e.g. tf.float32), got tf.string

Calling attention to it in case it affects anything.

Feature request: Add demos to the README

Some (like myself) are very curious about the methods and results, but don’t want or need to run the project ourselves.

Ideally a couple examples with starting file and resulting stems.
Maybe even at least one “ideal” example, and a least one example where the project still struggles, creating non-ideal output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.