# PolUVR 🎶
[![PyPI version](https://badge.fury.io/py/PolUVR.svg?icon=si%3Apython)](https://badge.fury.io/py/PolUVR)
[![Open In Huggingface](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/Politrees/PolUVR)
## 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](https://github.com/nomadkaraoke/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:
```sh
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:
```sh
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](https://www.wikihow.com/Install-FFmpeg-on-Windows) |
If you cloned the repository, you can install FFmpeg with:
```sh
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:
```sh
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](https://pytorch.org/get-started/locally/).
### Multiple CUDA Library Versions
If you need to install multiple CUDA versions (e.g., CUDA 11 alongside CUDA 12), use:
```sh
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:
```sh
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:
```sh
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](https://github.com/conda-forge/miniforge))
### Clone the Repository
```sh
git clone https://github.com/Bebra777228/PolUVR.git
cd PolUVR
```
### Create and Activate the Conda Environment
```sh
conda env create
conda activate PolUVR-dev
```
### Install Dependencies
```sh
poetry install
```
For extra dependencies, use:
```sh
poetry install --extras "cpu"
```
or
```sh
poetry install --extras "gpu"
```
### Running the Gradio interface Locally
```sh
PolUVR-app --open
```
### Deactivate the Virtual Environment
```sh
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](https://github.com/nomadkaraoke/python-audio-separator) repository. Special thanks to the contributors of the original project for their foundational work.
Raw data
{
"_id": null,
"home_page": "https://github.com/Bebra777228/PolUVR",
"name": "PolUVR",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "audio, sound, karaoke",
"author": "Politrees",
"author_email": "artyom.0.bebroy@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3d/a6/4e4c4aacdcee0110def9326a34f3ef8213f863ee443717430adf029fd948/poluvr-1.3.1.tar.gz",
"platform": null,
"description": "# PolUVR \ud83c\udfb6\n\n[![PyPI version](https://badge.fury.io/py/PolUVR.svg?icon=si%3Apython)](https://badge.fury.io/py/PolUVR)\n[![Open In Huggingface](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/Politrees/PolUVR)\n\n## Overview\n\n**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](https://github.com/nomadkaraoke/python-audio-separator), PolUVR offers enhanced usability, hardware acceleration, and a user-friendly Gradio interface.\n\n---\n\n## Key Features\n\n- **Audio Separation:** Extract vocals, instrumental, drums, bass, and other stems.\n- **Hardware Acceleration:** Supports CUDA (Nvidia GPUs) and CoreML (Apple Silicon).\n- **Cross-Platform:** Works on Linux, macOS, and Windows.\n- **Gradio Interface:** Easy-to-use web interface for audio separation.\n\n---\n\n## Installation \ud83d\udee0\ufe0f\n\n### Hardware Acceleration Options\n\nPolUVR supports multiple hardware acceleration options for optimal performance. To verify successful configuration, run:\n```sh\nPolUVR --env_info\n```\n\n| **Command** | **Expected Log Message**\t\t\t\t\t\t\t\t\t\t\t\t\t |\n|-----------------------------|----------------------------------------------------------------------------|\n| `pip install \"PolUVR[gpu]\"` | `ONNXruntime has CUDAExecutionProvider available, enabling acceleration` |\n| `pip install \"PolUVR[cpu]\"` | `ONNXruntime has CoreMLExecutionProvider available, enabling acceleration` |\n| `pip install \"PolUVR[cpu]\"` | No hardware acceleration enabled\t\t\t\t\t\t\t\t\t \t\t |\n\n---\n\n### FFmpeg Dependency\n\nPolUVR relies on FFmpeg for audio processing. To check if FFmpeg is installed, run:\n```sh\nPolUVR --env_info\n```\nThe log should show: `FFmpeg installed`\n\nIf FFmpeg is missing, install it using the following commands:\n\n| **OS** | **Command** |\n|-------------------|---------------------------------------------------------------------------------------------------|\n| **Debian/Ubuntu** | `apt-get update; apt-get install -y ffmpeg` |\n| **macOS** | `brew update; brew install ffmpeg` |\n| **Windows** | Follow this guide: [Install FFmpeg on Windows](https://www.wikihow.com/Install-FFmpeg-on-Windows) |\n\nIf you cloned the repository, you can install FFmpeg with:\n```sh\nPolUVR-ffmpeg\n```\n\n---\n\n## GPU / CUDA Specific Installation Steps\n\nWhile 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:\n\n```sh\npip uninstall torch onnxruntime\npip cache purge\npip install --force-reinstall torch torchvision torchaudio\npip install --force-reinstall onnxruntime-gpu\n```\n\nFor the latest PyTorch version, use the command recommended by the [PyTorch installation wizard](https://pytorch.org/get-started/locally/).\n\n### Multiple CUDA Library Versions\n\nIf you need to install multiple CUDA versions (e.g., CUDA 11 alongside CUDA 12), use:\n```sh\napt update; apt install nvidia-cuda-toolkit\n```\n\nIf you encounter errors like `Failed to load library` or `cannot open shared object file`, resolve them by running:\n```sh\npython -m pip install ort-nightly-gpu --index-url=https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-12-nightly/pypi/simple/\n```\n\n---\n\n## Usage \ud83d\ude80\n\n### Gradio Interface\n\nTo launch the Gradio interface, use:\n```sh\nPolUVR-app [--share] [--open]\n```\n\n| **Parameter** | **Description** |\n|---------------|--------------------------------------------------------------------------------|\n| `--share` | Opens public access to the interface (useful for servers, Google Colab, etc.). |\n| `--open` | Automatically opens the interface in a new browser tab. |\n\nAs soon as one of the following messages appears:\n```\nRunning on local URL: http://127.0.0.1:7860\n```\n```\nRunning on public URL: https://28425b3eb261b9ddc6.gradio.live\n```\nyou can click on the link to open the WebUI.\n\n---\n\n## Requirements \ud83d\udccb\n\n- Python >= 3.10\n- Libraries: torch, onnx, onnxruntime, numpy, librosa, requests, six, tqdm, pydub\n\n---\n\n## Developing Locally\n\n### Prerequisites\n\n- Python 3.10 or newer\n- Conda (recommended: [Miniforge](https://github.com/conda-forge/miniforge))\n\n### Clone the Repository\n\n```sh\ngit clone https://github.com/Bebra777228/PolUVR.git\ncd PolUVR\n```\n\n### Create and Activate the Conda Environment\n\n```sh\nconda env create\nconda activate PolUVR-dev\n```\n\n### Install Dependencies\n\n```sh\npoetry install\n```\n\nFor extra dependencies, use:\n```sh\npoetry install --extras \"cpu\"\n```\nor\n```sh\npoetry install --extras \"gpu\"\n```\n\n### Running the Gradio interface Locally\n\n```sh\nPolUVR-app --open\n```\n\n### Deactivate the Virtual Environment\n\n```sh\nconda deactivate\n```\n\n---\n\n## Contributing \ud83e\udd1d\n\nContributions 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.\n\n---\n\n## Acknowledgments\n\nThis project is a fork of the original [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator) repository. Special thanks to the contributors of the original project for their foundational work.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Easy to use audio stem separation with a UI, using various models from UVR trained primarily by @Anjok07",
"version": "1.3.1",
"project_urls": {
"Documentation": "https://github.com/Bebra777228/PolUVR/blob/main/README.md",
"Homepage": "https://github.com/Bebra777228/PolUVR",
"Repository": "https://github.com/Bebra777228/PolUVR"
},
"split_keywords": [
"audio",
" sound",
" karaoke"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7fd110a25aff108432018792a30a1b4b81550d43ba6093c1db0834ce04ee411c",
"md5": "4cb94698e0cde80f288a26cccf2de21d",
"sha256": "c82c0003ea4cd3fbabe93c03c4adde400e5f7d106b3698a3a8c5a51727a57b70"
},
"downloads": -1,
"filename": "poluvr-1.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4cb94698e0cde80f288a26cccf2de21d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 239343,
"upload_time": "2024-12-18T12:37:29",
"upload_time_iso_8601": "2024-12-18T12:37:29.294833Z",
"url": "https://files.pythonhosted.org/packages/7f/d1/10a25aff108432018792a30a1b4b81550d43ba6093c1db0834ce04ee411c/poluvr-1.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3da64e4c4aacdcee0110def9326a34f3ef8213f863ee443717430adf029fd948",
"md5": "a799ebe8241d0677bd95bbe7c2bc1054",
"sha256": "5b31ffb2690b0b4b01b767bade7c76825299df1bd4546cb7fd236d4e03a67357"
},
"downloads": -1,
"filename": "poluvr-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "a799ebe8241d0677bd95bbe7c2bc1054",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 185345,
"upload_time": "2024-12-18T12:37:30",
"upload_time_iso_8601": "2024-12-18T12:37:30.672852Z",
"url": "https://files.pythonhosted.org/packages/3d/a6/4e4c4aacdcee0110def9326a34f3ef8213f863ee443717430adf029fd948/poluvr-1.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-18 12:37:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Bebra777228",
"github_project": "PolUVR",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "poluvr"
}