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 Distribution

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

polyvoice-0.6.7-cp314-cp314-macosx_11_0_arm64.whl (8.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

File details

Details for the file polyvoice-0.6.7-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polyvoice-0.6.7-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c35ac79f7ea9c6a97913b094bcb54eb93ab66559efec7aa7c7999a8fe0974df0
MD5 163d1e2238d9543d002c3c60067683e8
BLAKE2b-256 d1660a48c6023b19b7b1b5ed17c37b2b45fbdc6c866b208edc751d8a894e5feb

See more details on using hashes here.

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