Skip to main content

Speaker diarization for Python — who spoke when. Rust + ONNX, no Python runtime overhead. K-means/AHC clustering, overlap detection.

Project description

polyvoice

CI PyPI License: MIT

Speaker diarization for Python — who spoke when.

Rust-powered, ONNX-based speaker diarization that runs on CPU, fits in 30 MB, and requires zero Python runtime overhead. Pipeline v2 with K-means auto-k clustering and overlap detection.

Install

pip install polyvoice

Requires Python 3.9+.

Quick start

import polyvoice

# Models auto-download on first run (~30 MB)
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) — balanced accuracy / speed.
  • polyvoice.Pipeline.mobile(models_cache=None) — smaller, faster model.
  • pipeline.run(samples, sample_rate)dict with num_speakers and turns.

Performance

Pipeline VoxConverse DER Model size
Hybrid + K-means 14.12% ~30 MB

See the full repository for Rust / C / CLI APIs, benchmarks, and development docs.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

polyvoice-0.6.9-cp312-cp312-win_amd64.whl (8.3 MB view details)

Uploaded CPython 3.12Windows x86-64

polyvoice-0.6.9-cp312-cp312-manylinux_2_38_x86_64.whl (10.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

polyvoice-0.6.9-cp312-cp312-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file polyvoice-0.6.9-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: polyvoice-0.6.9-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 8.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polyvoice-0.6.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a2c39dba7cd18b6c6745e97aad6fa3c66bab46dd5289604e240e0560e73158f0
MD5 625948355bb0c91005f3a05e8aadb7b8
BLAKE2b-256 af260581e0276d792a25e03e17589985084d0fb1c9991e44fcd4235f4e1ea0cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyvoice-0.6.9-cp312-cp312-win_amd64.whl:

Publisher: release.yml on ekhodzitsky/polyvoice

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

File details

Details for the file polyvoice-0.6.9-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for polyvoice-0.6.9-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 666c08966f4fd6cd0fb4b3ed12fe547634b2da5c49d1855d7e33f05f0d5ba1c6
MD5 2c21241282e72db8cac6f5efb9075038
BLAKE2b-256 977f279740f3b50275eca3d529efb474b4bcc8d31536031c761f8d610384a7f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyvoice-0.6.9-cp312-cp312-manylinux_2_38_x86_64.whl:

Publisher: release.yml on ekhodzitsky/polyvoice

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

File details

Details for the file polyvoice-0.6.9-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polyvoice-0.6.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbfba4b711ea9abe7cd238369331c7a50f4e2cd9cafd788e75c48b899bd2f9d2
MD5 7a166566a618bb9801daf768fc066742
BLAKE2b-256 99a995a9388cf476add5a82ab1e7396171e0cb0693a95f6a2c3d878e6cf7a992

See more details on using hashes here.

Provenance

The following attestation bundles were made for polyvoice-0.6.9-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on ekhodzitsky/polyvoice

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