ReDimNet2 ONNX
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70d6291e246f9fd82379e8687df493cd50449d4527a69fecfc9bfc38e469415
|
|
| MD5 |
56f283223c1be04a54ba036fda81da38
|
|
| BLAKE2b-256 |
1d2b4e3ad8ee47f0b4d7c82ea9f257f3db003291faec004cfaa432c6986c99cd
|
Provenance
The following attestation bundles were made for redimnet2_onnx-0.2.0.tar.gz:
Publisher:
publish.yaml on mediainbox/redimnet2-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redimnet2_onnx-0.2.0.tar.gz -
Subject digest:
d70d6291e246f9fd82379e8687df493cd50449d4527a69fecfc9bfc38e469415 - Sigstore transparency entry: 2706877113
- Sigstore integration time:
-
Permalink:
mediainbox/redimnet2-onnx@8e7bfecfca2d9964d582cb07cb02cdc868a2dab0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mediainbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@8e7bfecfca2d9964d582cb07cb02cdc868a2dab0 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e95b01b044daa178de68a13e0becdc101250cc087eacf13e6c26143b8653d5e1
|
|
| MD5 |
e51874734b98513c5008a1fea1eb7bf5
|
|
| BLAKE2b-256 |
f9ce632b7cb102575b9c88e37e612c3748a89a6279ab15f14b20c9825d698470
|
Provenance
The following attestation bundles were made for redimnet2_onnx-0.2.0-py3-none-any.whl:
Publisher:
publish.yaml on mediainbox/redimnet2-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redimnet2_onnx-0.2.0-py3-none-any.whl -
Subject digest:
e95b01b044daa178de68a13e0becdc101250cc087eacf13e6c26143b8653d5e1 - Sigstore transparency entry: 2706877143
- Sigstore integration time:
-
Permalink:
mediainbox/redimnet2-onnx@8e7bfecfca2d9964d582cb07cb02cdc868a2dab0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mediainbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@8e7bfecfca2d9964d582cb07cb02cdc868a2dab0 -
Trigger Event:
push
-
Statement type: