polyvoice
Speaker diarization for Python — who spoke when.
Rust-powered speaker diarization that runs on CPU, fits in ~8.4 MB INT8, and requires zero Python runtime overhead. The wheel uses the same hand-written INT8 kernels as the Rust CLI — no ONNX Runtime. Pipeline v2 with VBx clustering and overlap detection.
Install
pip install polyvoice
Requires Python 3.9+.
Quick start
import polyvoice
# Models auto-download on first run (~8.4 MB INT8)
pipeline = polyvoice.Pipeline.balanced()
result = pipeline.run(samples, sample_rate=16000)
print(f"Speakers: {result['num_speakers']}")
for turn in result["turns"]:
print(f"Speaker {turn['speaker']}: {turn['start']:.1f}s - {turn['end']:.1f}s")
API
polyvoice.Pipeline.balanced(models_cache=None, clusterer=None, vbx_plda_dir=None)— balanced accuracy / speed.polyvoice.Pipeline.mobile(models_cache=None, clusterer=None, vbx_plda_dir=None)— smaller, faster model.clustereris"vbx"(default, matching the CLI) or"ahc". VBx resolves its PLDA params viavbx_plda_dir, then thePOLYVOICE_VBX_PLDA_DIRenv var, then a registry download.pipeline.run(samples, sample_rate)→dictwithnum_speakersandturns.pipeline.run_result(samples, sample_rate)→ typedDiarizationResultwith.to_json()/.to_rttm()/.to_srt()/.to_vtt()/.to_txt()projections.polyvoice.DiarizationResult.from_json(json)— re-hydrate a saved result.
Performance
| Pipeline | VoxConverse-test DER (collar 0, overlap-scored) | Model size |
|---|---|---|
| default (v2+VBx, INT8 kernels) | 13.3% | ~8.4 MB |
Full protocol, collar/averaging disclosure, and competitor numbers: docs/BENCHMARKS.md.
See the full repository for Rust / C / CLI APIs, benchmarks, and development docs.
Metadata
Release files for polyvoice 0.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polyvoice-0.21.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| polyvoice-0.21.0-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details |
| polyvoice-0.21.0-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
Total release size: 7.3 MB
Release files / polyvoice-0.21.0-cp312-cp312-win_amd64.whl
| Download URL | polyvoice-0.21.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
67156b08ae9a01d6bfdada04833d80ce824b82610d172c37447a7c4e65845701
|
|
BLAKE2b-256 checksum How to use checksums |
5ae24d34dd87e56872ca8166dbdcebed2ba9bc2db82859e1697ba6136b448573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / polyvoice-0.21.0-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | polyvoice-0.21.0-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
76e414cd7d846b095cd670bf2441caced028e918967a262b8c6ab1e266b62e22
|
|
BLAKE2b-256 checksum How to use checksums |
fcca7543a0a708b5229be00473b1b5811cd5ecc72b3e5f535ed3fc18402f74cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / polyvoice-0.21.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | polyvoice-0.21.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e5d9d22d7d39d05e3ff122d7891e31c0883d5bb86ae8ffc52bb2314d3a6a66ce
|
|
BLAKE2b-256 checksum How to use checksums |
b654cc580697004ed60e4af4da47581ace993698d3ff2f54a29b37ea1e8d10d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log