Skip to main content

ReDimNet2 ONNX

CI status Publish status PyPI Python License Documentation ONNX Model Ruff Pylint Checked with mypy

Run the official PalabraAI ReDimNet2 speaker-verification models with ONNX Runtime. All 20 published checkpoints are available and produce L2-normalized 192-dimensional embeddings.

Installation

For raw 16 kHz audio on CPU:

pip install "redimnet2-onnx[cpu,waveform]"

Other supported setups:

Use case Installation
Mel features on CPU pip install "redimnet2-onnx[cpu]"
Mel features on NVIDIA CUDA pip install "redimnet2-onnx[cuda]"
Raw waveform on CPU pip install "redimnet2-onnx[cpu,waveform]"
Raw waveform on CUDA/TensorRT pip install "redimnet2-onnx[cuda,waveform]"
Intel OpenVINO pip install "redimnet2-onnx[openvino]"
Windows DirectML pip install "redimnet2-onnx[directml]"
Qualcomm QNN pip install "redimnet2-onnx[qnn]"

Quick Start

Pass a mono 16 kHz waveform as a NumPy array or PyTorch tensor. Audio must be between 1 and 30 seconds.

from redimnet2_onnx import load_model

model = load_model("b6-vb2+vox2_v0-lm")
embedding = model.embed(waveform)

print(embedding.shape)  # (1, 192)

Models are downloaded once from the versioned GitHub Release, cached locally, and verified with SHA-256.

To compare two voices, use cosine similarity. The embeddings are already normalized:

similarity = (embedding_a @ embedding_b.T).item()

Models

List the available checkpoints:

from redimnet2_onnx import available_models, load_model

print(available_models())
model = load_model("b6-vb2+vox2_v0-lm")

Mel Features

PyTorch is optional when mel features are produced elsewhere. The ONNX input is FP32 [1, 1, 72, T], where T must be divisible by four and represent approximately 1-30 seconds of audio.

from redimnet2_onnx import load_model

model = load_model("b6-vb2+vox2_v0-lm", providers=["CUDAExecutionProvider"])
embedding = model.embed_features(features)

TensorRT

For ONNX Runtime TensorRT EP with FP16, CUDA I/O binding, and persistent engine caches:

from redimnet2_onnx.tensorrt import load_tensorrt_model

model = load_tensorrt_model("b6-vb2+vox2_v0-lm")
embedding = model.embed(waveform_tensor)

This requires compatible CUDA and TensorRT libraries on the host. The TensorRT Python package is not required.

See the documentation for the complete API reference.

Download files

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

Source Distribution

redimnet2_onnx-0.2.0.tar.gz (154.9 kB view details)

Uploaded Source

Built Distribution

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

redimnet2_onnx-0.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file redimnet2_onnx-0.2.0.tar.gz.

File metadata

  • Download URL: redimnet2_onnx-0.2.0.tar.gz
  • Upload date:
  • Size: 154.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for redimnet2_onnx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d70d6291e246f9fd82379e8687df493cd50449d4527a69fecfc9bfc38e469415
MD5 56f283223c1be04a54ba036fda81da38
BLAKE2b-256 1d2b4e3ad8ee47f0b4d7c82ea9f257f3db003291faec004cfaa432c6986c99cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for redimnet2_onnx-0.2.0.tar.gz:

Publisher: publish.yaml on mediainbox/redimnet2-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 redimnet2_onnx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: redimnet2_onnx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for redimnet2_onnx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e95b01b044daa178de68a13e0becdc101250cc087eacf13e6c26143b8653d5e1
MD5 e51874734b98513c5008a1fea1eb7bf5
BLAKE2b-256 f9ce632b7cb102575b9c88e37e612c3748a89a6279ab15f14b20c9825d698470

See more details on using hashes here.

Provenance

The following attestation bundles were made for redimnet2_onnx-0.2.0-py3-none-any.whl:

Publisher: publish.yaml on mediainbox/redimnet2-onnx

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page