Metadata-Version: 2.4
Name: rmvpe-onnx
Version: 0.2.3
Summary: RMVPE pitch estimator — pure ONNX Runtime inference
Project-URL: Documentation, https://NewComer00.github.io/rmvpe-onnx/
Project-URL: Source, https://github.com/NewComer00/rmvpe-onnx
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: huggingface-hub>=1.9
Requires-Dist: librosa>=0.11
Requires-Dist: numpy<2.3,>=1.22; python_version < '3.11'
Requires-Dist: numpy>=1.23; python_version >= '3.11'
Requires-Dist: onnxruntime<1.24,>=1.19; python_version < '3.11'
Requires-Dist: onnxruntime>=1.24; python_version >= '3.11'
Requires-Dist: scipy>=1.15
Provides-Extra: build
Requires-Dist: build>=1.4; extra == 'build'
Provides-Extra: cli
Requires-Dist: plotly>=6.6; extra == 'cli'
Requires-Dist: soundfile>=0.13; extra == 'cli'
Provides-Extra: dev
Requires-Dist: build>=1.4; extra == 'dev'
Requires-Dist: furo>=2025.12; extra == 'dev'
Requires-Dist: plotly>=6.6; extra == 'dev'
Requires-Dist: pyinstaller>=6.19; extra == 'dev'
Requires-Dist: pytest-cov>=7.1; extra == 'dev'
Requires-Dist: pytest>=9.0; extra == 'dev'
Requires-Dist: python-semantic-release>=10.5; extra == 'dev'
Requires-Dist: ruff>=0.15; extra == 'dev'
Requires-Dist: soundfile>=0.13; extra == 'dev'
Requires-Dist: sphinx-argparse>=0.5; extra == 'dev'
Requires-Dist: sphinx-autobuild>=2024.10; extra == 'dev'
Requires-Dist: sphinx-autodoc-typehints>=3.0; extra == 'dev'
Requires-Dist: sphinx>=8.1; extra == 'dev'
Requires-Dist: tox-gh>=1.4; extra == 'dev'
Requires-Dist: tox-uv>=1.34; extra == 'dev'
Requires-Dist: tox>=4.22; extra == 'dev'
Requires-Dist: uv>=0.11; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2025.12; extra == 'docs'
Requires-Dist: sphinx-argparse>=0.5; extra == 'docs'
Requires-Dist: sphinx-autobuild>=2024.10; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=3.0; extra == 'docs'
Requires-Dist: sphinx>=8.1; extra == 'docs'
Provides-Extra: install
Requires-Dist: pyinstaller>=6.19; extra == 'install'
Provides-Extra: lint
Requires-Dist: ruff>=0.15; extra == 'lint'
Provides-Extra: release
Requires-Dist: python-semantic-release>=10.5; extra == 'release'
Requires-Dist: uv>=0.11; extra == 'release'
Provides-Extra: test
Requires-Dist: plotly>=6.6; extra == 'test'
Requires-Dist: pytest-cov>=7.1; extra == 'test'
Requires-Dist: pytest>=9.0; extra == 'test'
Requires-Dist: ruff>=0.15; extra == 'test'
Requires-Dist: soundfile>=0.13; extra == 'test'
Requires-Dist: tox-gh>=1.4; extra == 'test'
Requires-Dist: tox-uv>=1.34; extra == 'test'
Requires-Dist: tox>=4.22; extra == 'test'
Requires-Dist: uv>=0.11; extra == 'test'
Provides-Extra: tox
Requires-Dist: tox-gh>=1.4; extra == 'tox'
Requires-Dist: tox-uv>=1.34; extra == 'tox'
Requires-Dist: tox>=4.22; extra == 'tox'
Requires-Dist: uv>=0.11; extra == 'tox'
Provides-Extra: uv
Requires-Dist: uv>=0.11; extra == 'uv'
Description-Content-Type: text/markdown

# rmvpe-onnx

[![PyPI version](https://badge.fury.io/py/rmvpe-onnx.svg)](https://badge.fury.io/py/rmvpe-onnx)
[![Required Python Version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FNewComer00%2Frmvpe-onnx%2FHEAD%2Fpyproject.toml)](https://pypi.org/project/rmvpe-onnx/)
[![License](https://img.shields.io/pypi/l/rmvpe-onnx.svg)](https://pypi.org/project/rmvpe-onnx/)

RMVPE pitch estimator with ONNX Runtime backend.

A simple wrapper around ONNX-related code in [`rvc/lib/rmvpe.py @ 7e03261`](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/blob/7e03261/rvc/lib/rmvpe.py), [RVC-Project/Retrieval-based-Voice-Conversion](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion)  
Copyright (c) 2023 liujing04, 源文雨, Ftps — MIT License

ONNX model from [lj1995/VoiceConversionWebUI](https://huggingface.co/lj1995/VoiceConversionWebUI)  
Copyright (c) 2022 lj1995 — MIT License

---

## Install

### pip

```bash
pip install rmvpe-onnx         # Python API only
pip install "rmvpe-onnx[cli]"  # Python API with CLI tool
```

### uv

```bash
uv add rmvpe-onnx              # Python API only
uv add "rmvpe-onnx[cli]"       # Python API with CLI tool
```

> [!TIP]
> This package includes `onnxruntime` (CPU) as a dependency, which is sufficient for most use cases.
> For hardware acceleration (CUDA, DirectML, etc.), please install a compatible ONNX Runtime variant. See the [ONNX Runtime documentation](https://onnxruntime.ai/).

## Development

```bash
git clone https://github.com/NewComer00/rmvpe-onnx && cd rmvpe-onnx
uv sync --extra dev

# Optional: Run all tests
# uv run tox
```

## CLI

```bash
# Optional: Download the ONNX model
# Will be done automatically on first prediction if not done manually
rmvpe-onnx download

# Run pitch prediction with default settings and plot the results
rmvpe-onnx predict audio.wav --plot
```

For all options, see the [CLI Reference](https://NewComer00.github.io/rmvpe-onnx/cli.html) or run `rmvpe-onnx download --help` and `rmvpe-onnx predict --help`.

## Python API

> [!NOTE]
> The Python API returns raw outputs with no confidence thresholding applied. Use `confidence` to filter `frequency` yourself if needed.

```python
from rmvpe_onnx import RMVPE
import soundfile as sf

audio, sr = sf.read("audio.wav")
rmvpe = RMVPE()

time, frequency, confidence, activation = rmvpe.predict(audio=audio, sr=sr)

# Optional: Zero out frequency where confidence is below a threshold
# frequency[confidence < 0.03] = 0.0
```

For full parameter reference and return values, see the [API Reference](https://NewComer00.github.io/rmvpe-onnx/api.html).
