Skip to main content

RMVPE pitch estimator — pure ONNX Runtime inference

Project description

rmvpe-onnx

PyPI version Required Python Version License

RMVPE pitch estimator with ONNX Runtime backend.

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

ONNX model from lj1995/VoiceConversionWebUI
Copyright (c) 2022 lj1995 — MIT License


Install

pip

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

uv

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.

Development

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

# Optional: run all tests
# uv run tox

CLI

# 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 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.

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.

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

rmvpe_onnx-0.2.2.tar.gz (193.9 kB view details)

Uploaded Source

Built Distribution

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

rmvpe_onnx-0.2.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file rmvpe_onnx-0.2.2.tar.gz.

File metadata

  • Download URL: rmvpe_onnx-0.2.2.tar.gz
  • Upload date:
  • Size: 193.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.9

File hashes

Hashes for rmvpe_onnx-0.2.2.tar.gz
Algorithm Hash digest
SHA256 40971fdc7e08873cf6db6a6d21e4eb01e718199abc77c95eb0b7c0ddad4e16d6
MD5 b0cbbc10d235b5dd0ff05260a83e761d
BLAKE2b-256 c884c2fed3b5d17c77bdbe842f7847084f6ce7ecb4631bf7250d50e42a38782f

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmvpe_onnx-0.2.2.tar.gz:

Publisher: publish.yml on NewComer00/rmvpe-onnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rmvpe_onnx-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: rmvpe_onnx-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.9

File hashes

Hashes for rmvpe_onnx-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1156fe239092b4f5706fa368c3fbcf46ad7503fdf204ea8f45e5cde9bc5a710b
MD5 8aa2d3a456929a434fd48e0d99280cfb
BLAKE2b-256 3804ea33a542977e2520d463e05a9be1da7ac55131102689880d07a4f833d9e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rmvpe_onnx-0.2.2-py3-none-any.whl:

Publisher: publish.yml on NewComer00/rmvpe-onnx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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