What is Spleeter? ⇒ A great guy who separates music data into parts by machine learning! !!
There are many articles published that include unnecessary steps such as installing Git for building the environment of Spleeter for Windows, so I tried to summarize the simple steps.
Download Miniconda (Python 3.x Windows installers) from the following site. https://docs.conda.io/en/latest/miniconda.html
Create "spleeter-cpu.yaml" with a text editor.
spleeter-cpu.yaml
name: spleeter-cpu
channels:
- conda-forge
- anaconda
dependencies:
- python=3.7
- tensorflow=1.14.0
- ffmpeg
- pandas==0.25.1
- requests
- pip
- pip:
- museval==0.3.0
- musdb==0.3.1
- norbert==0.2.1
- spleeter
conda env create -f [path of spleeter-cpu.yaml]
. It will be downloaded in various ways, so wait until it is completed.conda info --envs
and verify that" spleeter-cpu "has been created.conda activate spleeter-cpu
.spleeter separate -i [music data path] -o [output destination path] -p spleeter: [2 or 4 or 5] stems
.Example: spleeter separate -i hoge.wav -o D: \ hoge -p spleeter: 2stems
Use the numbers [2 or 4 or 5] according to the number of parts you want to separate. 2: Vocal / Accompaniment 4: Vocal / Drum / Bass / Other 5: Vocal / Drum / Bass / Piano / Other
Machine learning data is downloaded to the input source folder, so if you unify the input source, you can shorten the time from the next time onwards ...
I also have a batch that can process multiple files by D & D. Please rewrite [User name] according to your environment. If spaces, tabs, equal signs, semicolons, and commas that are recognized as delimiters in the command prompt specifications are included in the music data file name, the output destination folder will be strange.
spleeter.bat
@echo off
set DESTPATH=%~dp1
set /P ITEM="Enter the number of separations and press Enter(2/4/5):"
set FLAG=False
if %ITEM%==2 set FLAG=True
if %ITEM%==4 set FLAG=True
if %ITEM%==5 set FLAG=True
if %FLAG%==True (
call C:\Users\[User name]\miniconda3\Scripts\activate.bat
call conda activate spleeter-cpu
for %%f in (%*) do call python -m spleeter separate -i %%f -o %DESTPATH% -p spleeter:%ITEM%stems
echo It's over. Press any key to exit.
)else echo The number of separations is strange. Press any key to exit.
pause > nul
Recommended Posts