Skip to main content

Easy to use audio stem separation with a UI, using various models from UVR trained primarily by @Anjok07

Project description

PolUVR 🎶

PyPI version Open In Huggingface

Overview

PolUVR is a Python-based audio separation tool that leverages advanced machine learning models to separate audio tracks into distinct stems, such as vocals, instrumental, drums, bass, and more. Built as a fork of the python-audio-separator, PolUVR offers enhanced usability, hardware acceleration, and a user-friendly Gradio interface.


Key Features

  • Audio Separation: Extract vocals, instrumental, drums, bass, and other stems.
  • Hardware Acceleration: Supports CUDA (Nvidia GPUs) and CoreML (Apple Silicon).
  • Cross-Platform: Works on Linux, macOS, and Windows.
  • Gradio Interface: Easy-to-use web interface for audio separation.

Installation 🛠️

Hardware Acceleration Options

PolUVR supports multiple hardware acceleration options for optimal performance. To verify successful configuration, run:

PolUVR --env_info
Command Expected Log Message
pip install "PolUVR[gpu]" ONNXruntime has CUDAExecutionProvider available, enabling acceleration
pip install "PolUVR[cpu]" ONNXruntime has CoreMLExecutionProvider available, enabling acceleration
pip install "PolUVR[cpu]" No hardware acceleration enabled

FFmpeg Dependency

PolUVR relies on FFmpeg for audio processing. To check if FFmpeg is installed, run:

PolUVR --env_info

The log should show: FFmpeg installed

If FFmpeg is missing, install it using the following commands:

OS Command
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 install FFmpeg with:

PolUVR-ffmpeg

GPU / CUDA Specific Installation Steps

While installing PolUVR with the [gpu] extra should suffice, sometimes PyTorch and ONNX Runtime with CUDA support require manual intervention. If you encounter issues, follow these steps:

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

If you need to install multiple CUDA versions (e.g., CUDA 11 alongside CUDA 12), use:

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

To launch the Gradio interface, use:

PolUVR-app [--share] [--open]
Parameter Description
--share Opens public access to the interface (useful for servers, Google Colab, etc.).
--open Automatically opens the interface in a new browser tab.

As soon as one of the following messages appears:

Running on local URL:  http://127.0.0.1:7860
Running on public URL: https://28425b3eb261b9ddc6.gradio.live

you can click on the link to open 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/Bebra777228/PolUVR.git
cd PolUVR

Create and Activate the Conda Environment

conda env create
conda activate PolUVR-dev

Install Dependencies

poetry install

For extra dependencies, use:

poetry install --extras "cpu"

or

poetry install --extras "gpu"

Running the Gradio interface Locally

PolUVR-app --open

Deactivate the Virtual Environment

conda deactivate

Contributing 🤝

Contributions are welcome! Fork the repository, make your changes, and submit a pull request. For major changes, please open an issue first to discuss what you would like to add.


Acknowledgments

This project is a fork of the original python-audio-separator repository. Special thanks to the contributors of the original project for their foundational work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poluvr-1.3.5.tar.gz (258.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poluvr-1.3.5-py3-none-any.whl (323.1 kB view details)

Uploaded Python 3

File details

Details for the file poluvr-1.3.5.tar.gz.

File metadata

  • Download URL: poluvr-1.3.5.tar.gz
  • Upload date:
  • Size: 258.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for poluvr-1.3.5.tar.gz
Algorithm Hash digest
SHA256 515d1789b4964090db1421b96eaa7aaf2447c19337b8a17364c2d6eb803cee99
MD5 abacb183e88141fc33d178d79cb9ed16
BLAKE2b-256 14382b8ecfb32d36056194c0f9536b70a277a08cef81eb0cde4deb9c06ae1271

See more details on using hashes here.

File details

Details for the file poluvr-1.3.5-py3-none-any.whl.

File metadata

  • Download URL: poluvr-1.3.5-py3-none-any.whl
  • Upload date:
  • Size: 323.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for poluvr-1.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5c9f3fc59c75660ee5e9314ac60a77a41b0242588483ff11d85ff0798167144b
MD5 4fd4fca25daf179d2c4d6ff7f8abe2bb
BLAKE2b-256 d7cc97cf014c5faebcd22f0770922318a7529a35746b4c67891679369d12bb77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page