Easy to use audio stem separation with a UI, using various models from UVR trained primarily by @Anjok07
Project description
PolUVR 🎶
Overview
PolUVR is a Python-based audio separation tool that leverages advanced machine learning models to separate audio tracks into different stems, such as vocals, instrumental, drums, bass, and more. This project is a fork of the python-audio-separator repository, and it aims to provide a user-friendly interface for audio separation tasks.
Installation 🛠️
Hardware Acceleration Options
Nvidia GPU with CUDA
Supported CUDA Versions: 11.8 and 12.2
To verify successful configuration, run PolUVR --env_info. You should see the following log message:
ONNXruntime has CUDAExecutionProvider available, enabling acceleration
Installation:
pip install "PolUVR[gpu]"
Apple Silicon, macOS Sonoma+ with M1 or newer CPU (CoreML acceleration)
To verify successful configuration, run PolUVR --env_info. You should see the following log message:
ONNXruntime has CoreMLExecutionProvider available, enabling acceleration
Installation:
pip install "PolUVR[cpu]"
CPU-Only (No Hardware Acceleration)
Installation:
pip install "PolUVR[cpu]"
FFmpeg Dependency
To check if PolUVR is correctly configured to use FFmpeg, run PolUVR --env_info. The log should show:
FFmpeg installed
If it says that FFmpeg is missing or an error occurs, install FFmpeg using the following commands:
Debian/Ubuntu:
-
apt-get update; apt-get install -y ffmpeg
macOS:
-
brew update; brew install ffmpeg
Windows:
- Follow this guide: Install-FFmpeg-on-Windows
If you cloned the repository, you can use the following command to install FFmpeg:
PolUVR-ffmpeg
GPU / CUDA Specific Installation Steps
In theory, installing PolUVR with the [gpu] extra should suffice. However, sometimes PyTorch and ONNX Runtime with CUDA support can be tricky. You may need to reinstall these packages directly:
pip uninstall torch onnxruntime
pip cache purge
pip install --force-reinstall torch torchvision torchaudio
pip install --force-reinstall onnxruntime-gpu
For the latest PyTorch version, use the command recommended by the PyTorch installation wizard.
Multiple CUDA Library Versions
Depending on your environment, you may need specific CUDA library versions. For example, Google Colab uses CUDA 12 by default, but ONNX Runtime may still require CUDA 11 libraries. Install CUDA 11 libraries alongside CUDA 12:
apt update; apt install nvidia-cuda-toolkit
If you encounter errors like Failed to load library or cannot open shared object file, resolve them by running:
python -m pip install ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple/
Usage 🚀
Gradio Interface
usage: PolUVR-app [--share] [--open]
Params:
--share Opens public access to the interface (for servers, Google Colab, Kaggle, etc.).
--open Automatically opens the interface in a new browser tab.
Once the following output message Running on local URL: http://127.0.0.1:7860 or Running on public URL: https://28425b3eb261b9ddc6.gradio.live appears, you can click on the link to open a tab with the WebUI.
Requirements 📋
- Python >= 3.10
- Libraries: torch, onnx, onnxruntime, numpy, librosa, requests, six, tqdm, pydub
Developing Locally
Prerequisites
- Python 3.10 or newer
- Conda (recommended: Miniforge)
Clone the Repository
git clone https://github.com/YOUR_USERNAME/PolUVR.git
cd PolUVR
Create and Activate the Conda Environment
conda env create
conda activate PolUVR-dev
Install Dependencies
poetry install
Install extra dependencies:
poetry install --extras "cpu"
or
poetry install --extras "gpu"
Running the CLI Locally
PolUVR path/to/your/audio-file.wav
Deactivate the Virtual Environment
conda deactivate
Contributing 🤝
Contributions are welcome! Fork the repository, make your changes, and submit a pull request.
Original Repository
This project is a fork of the original python-audio-separator repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poluvr-1.3.0.tar.gz.
File metadata
- Download URL: poluvr-1.3.0.tar.gz
- Upload date:
- Size: 185.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4386105abc6493b64172e67316bc5fb9a35c47fb0fbb008b615502a82236b44
|
|
| MD5 |
b5604334e349cf3d0ded0d45418e90a9
|
|
| BLAKE2b-256 |
60dffef145249fb715b8cff93197ecb2f127b006a73b37a171f1fe3242f70a52
|
File details
Details for the file poluvr-1.3.0-py3-none-any.whl.
File metadata
- Download URL: poluvr-1.3.0-py3-none-any.whl
- Upload date:
- Size: 239.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5801efe2b2ded1dd8e7113e744b0d2fad3897021940e9e135a6357be997498b
|
|
| MD5 |
db28155ec5bd1a0098652f85c1b7c074
|
|
| BLAKE2b-256 |
b93b816029928790bc9f5d3995289a0bc5417e43e786ca512eb7f19252c13790
|