Skip to content

yxlllc/vocal-remover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vocal-remover

This is a deep-learning-based tool to extract instrumental track from your songs.

Installation

Install PyTorch

See: GET STARTED

Install the other packages

cd vocal-remover
pip install -r requirements.txt

Usage

The following command separates the input into instrumental and vocal tracks. They are saved as *_Instruments.wav and *_Vocals.wav.

Run on CPU

python inference.py --input path/to/an/audio/file -P path/to/an/model/weight

Run on GPU

python inference.py --input path/to/an/audio/file -P path/to/an/model/weight --gpu 0

Train your own model

Place your dataset

path/to/dataset/
  +- instruments/
  |    +- aaa.wav
  |    +- bbb.wav
  |    +- ...
  +- mixtures/
       +- aaa.wav
       +- bbb.wav
       +- ...

Train a model

# train a mono model 训练单声道模型
python train.py --dataset path/to/dataset --gpu 0 --mono --exp_name your_exp_name
# train a stereo model 训练立体声模型
python train.py --dataset path/to/dataset --gpu 0 --exp_name your_exp_name

Export the model

# requirements: PyTorch >= 2.1.0
pip install onnx onnxsim
python export.py path/to/model.pt path/to/model.onnx

References

About

Vocal Remover using Deep Neural Networks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%