Skip to main content

polyvoice

CI PyPI License: MIT

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. clusterer is "vbx" (default, matching the CLI) or "ahc". VBx resolves its PLDA params via vbx_plda_dir, then the POLYVOICE_VBX_PLDA_DIR env var, then a registry download.
  • pipeline.run(samples, sample_rate) → dict with num_speakers and turns.
  • pipeline.run_result(samples, sample_rate) → typed DiarizationResult with .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.

Release wheels are qualified on CPython 3.12 for Linux x86_64/ARM64, macOS ARM64 and Windows x86_64. Other source-build interpreters are not an implied wheel support promise. See the artifact matrix and checks.

Metadata

Release files for polyvoice 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for polyvoice 1.0.0
File
polyvoice-1.0.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
polyvoice-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details
polyvoice-1.0.0-cp312-cp312-manylinux_2_34_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ ARM64 Details
polyvoice-1.0.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details

Total release size: 10.1 MB

Release files / polyvoice-1.0.0-cp312-cp312-win_amd64.whl

Download URL polyvoice-1.0.0-cp312-cp312-win_amd64.whl
Size 2.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
92c1d03bb2d20bc48dcd8f26e1b4f0e12683beff5cdbd6ac797c00c827cc29da
BLAKE2b-256 checksum
How to use checksums
4d3f801b183bd261586e3b81c31643790bc14e3d9009652bd961ee171a796bc9
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 Oct 1, 2026.

Transparency log

Release files / polyvoice-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL polyvoice-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 2.9 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
f51b10a744033460b85bdbc032428754378ddc3806e9e207dfb3b2247a45d897
BLAKE2b-256 checksum
How to use checksums
d46175ee5eba9107a22ff6f3d00c207070246bf9bb6dfc567c74f943d90f6945
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 Oct 1, 2026.

Transparency log

Release files / polyvoice-1.0.0-cp312-cp312-manylinux_2_34_aarch64.whl

Download URL polyvoice-1.0.0-cp312-cp312-manylinux_2_34_aarch64.whl
Size 2.6 MB
Tags CPython 3.12 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
967affc8684fb579ebd3b5b465ae4aadb94b51d55dacc0168d0e0e280bfb7667
BLAKE2b-256 checksum
How to use checksums
c03dadbebcb64c026ff9288d6e4f5b71a3655005a3406c81848ee14aa1c7a07b
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 Oct 1, 2026.

Transparency log

Release files / polyvoice-1.0.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL polyvoice-1.0.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
153ef639e53dc26857ec59d5890b04893dd661684ea26f068fee9709fdc24b36
BLAKE2b-256 checksum
How to use checksums
d8f3dc39df35cf1b71901ed7cc6fd0d5dc1a5441cc245f359e508d2744e63f68
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 Oct 1, 2026.

Transparency log
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