Skip to main content

speakrs

speakrs does speaker diarization with pyannote-level accuracy. Inference runs in Rust on the CPU, on Apple CoreML, or on NVIDIA CUDA, with no PyTorch or ONNX Runtime.

pip install speakrs
Platform Modes
macOS arm64 CPU, CoreML, CoreMLFast
Linux x86_64 (glibc 2.28+) CPU, CUDA, CUDAFast

The package needs Python 3.11 or newer. One wheel covers every Python version.

Use

import speakrs

pipeline = speakrs.Pipeline.from_pretrained("cpu")  # downloads the models once
result = pipeline.diarize_file("meeting.wav")

for segment in result.segments:
    print(f"{segment.start:7.2f} {segment.end:7.2f} {segment.speaker}")

print(result.rttm())

To diarize many files, use the batch method. It decodes files ahead of inference and overlaps clustering with the next file:

results = pipeline.diarize_files(["a.wav", "b.flac", "c.mp3"])

Audio that is already in memory has to be 16 kHz mono float32. A NumPy array is read in place, without a copy:

result = pipeline.diarize_samples(samples, file_id="call-42")

The command line prints RTTM:

speakrs diarize meeting.wav --mode coreml

See API.md for the full API: the queue, async methods, configuration, progress events, cancellation, and error categories.

Example: a transcript with speakers

examples/transcribe.py combines speakrs with faster-whisper to write a transcript that says who said what. It runs diarization and transcription at the same time and gives each word to the speaker talking at that moment. uv can run it straight from GitHub:

uv run https://raw.githubusercontent.com/avencera/speakrs/master/crates/speakrs-python/examples/transcribe.py meeting.mp3
[06:31] Speaker 2: Crocodile?

[06:34] Speaker 5: Yeah, it can be a crocodile. It can be a crocodile. Firstly, it was an attempt at a T-rex, and then it sort of changed into a pelican, but it can be a crocodile.

[06:59] Speaker 1: That's lovely.

speakrs diarizes a 17-minute meeting in 0.6 seconds on an RTX 5090 and in under 5 seconds on an M4 Pro in CoreML mode, so whisper takes almost all of the time. The script picks CoreML on macOS and CUDA on Linux when it finds an NVIDIA GPU, falling back to the CPU when that GPU is older than Turing; --mode overrides that, and --whisper-model turbo gives a better transcript.

CUDA

The Linux wheel includes the CUDA backend. It needs an NVIDIA driver and a Turing (RTX 20, T4) or newer GPU, but no CUDA toolkit. On a machine without a GPU, the wheel still imports and runs on the CPU.

speakrs runs its own kernels for every layer. cuDNN 9 and cuBLAS are only a fallback for a layer that has no kernel for your GPU. If you want that fallback, install it with:

pip install "speakrs[cuda]"

Models

prepare() and from_pretrained() download the models from the avencera/speakrs-models Hugging Face repository. They go into the Hugging Face hub cache, which is set by SPEAKRS_CACHE_DIR or HF_HOME.

To skip the download, pass model_dir= to use a local directory instead.

Metadata

Release files for speakrs 0.7.0

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

Source distribution (sdist)

Source distribution for speakrs 0.7.0
File Size Uploaded Provenance Actions
speakrs-0.7.0.tar.gz 18.3 MB With provenance Details for speakrs-0.7.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for speakrs 0.7.0
File Interpreter ABI Platform Actions
speakrs-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for speakrs-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl
speakrs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for speakrs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 44.1 MB

Release files / speakrs-0.7.0.tar.gz

Download URL speakrs-0.7.0.tar.gz
Size 18.3 MB
Tags Source
SHA-256 checksum
How to use checksums
aa22143bc0518df588372dde5384acc8b1c5513e65a03689c2e83cd5281fdb5d
BLAKE2b-256 checksum
How to use checksums
73fc84c1ba3b069c444e6726f1396754129c7cb3277e2c42f4701659b7abeae7
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 27, 2026.

Transparency log

Release files / speakrs-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL speakrs-0.7.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 22.2 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
62c0a563b71d378f5fff1d7397b4a89fbe5b089a533507988f6f5b0adc53dc74
BLAKE2b-256 checksum
How to use checksums
19433c2a6255d170f8920cece3ed5d4af5662dec5c80dbfeee112e57fb60a9a0
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 27, 2026.

Transparency log

Release files / speakrs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL speakrs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Size 3.6 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ab46266087a3ea9141afb1fa89caa9bd32f241c4960386b249d34bc68c3f2ab2
BLAKE2b-256 checksum
How to use checksums
d96d23667eee051e7df5bef448eb2257cf4f07e985a82bc25a740f7de939afb7
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 27, 2026.

Transparency log

Security for speakrs 0.7.0

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.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for speakrs-0.7.0.tar.gz

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 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.0 This release

3 release files Full provenance

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