speakrs models
Model files for speakrs, a Rust speaker diarization library that runs the pyannote community-1 pipeline natively on CPU, CUDA (NVIDIA) and Core ML (macOS), with ONNX Runtime for AMD GPUs. With the default online feature, speakrs downloads the files it needs on first use from a pinned revision of this repository.
These are exports and conversions of pyannote's models, not new or retrained models. The Core ML variants include FP16 and 8-bit-weight (W8A16) segmentation models.
Speed
VoxConverse dev (20.3 h), collar 0:
| Hardware | Implementation | DER | Speed (x real time) |
|---|---|---|---|
| RTX 4090 | speakrs cuda |
7.0 % | 1912x |
| RTX 4090 | speakrs cuda-fast |
7.4 % | 3646x |
| RTX 5090 | speakrs cuda |
7.0 % | 2922x |
| RTX 4090 | pyannote community-1 (PyTorch) | 7.2 % | 32x |
| Apple M4 Pro | speakrs coreml |
7.1 % | 529x |
Hardware details and the timing method are in the speakrs benchmarks.
Usage
speakrs = { version = "0.7", features = ["coreml"] } # macOS
speakrs = { version = "0.7", features = ["cuda"] } # NVIDIA GPU
speakrs = { version = "0.7", features = ["cpu"] } # CPU
use speakrs::{ExecutionMode, OwnedDiarizationPipeline};
let mut pipeline = OwnedDiarizationPipeline::from_pretrained(ExecutionMode::Cuda)?;
let result = pipeline.run(&audio)?; // mono 16 kHz f32 samples
print!("{}", result.rttm("my-audio"));
Python:
pip install speakrs
import speakrs
pipeline = speakrs.Pipeline.from_pretrained("cpu") # or "coreml", "cuda"
print(pipeline.diarize_file("meeting.wav").rttm())
For offline setups, download this repository and set SPEAKRS_MODELS_DIR to its local path.
Contents
| Files | Used by | Source |
|---|---|---|
segmentation-3.0.safetensors |
native CPU and CUDA | pyannote/segmentation-3.0 |
wespeaker-multimask-tail.safetensors |
native CPU and CUDA | pyannote/wespeaker-voxceleb-resnet34-LM |
segmentation-3.0*.mlmodelc, wespeaker*.mlmodelc |
Core ML | the same two models, converted |
*.onnx |
ONNX Runtime (MIGraphX) | the same two models, exported |
plda_*.npy |
all modes, clustering | PLDA and VBx parameters from pyannote/speaker-diarization-community-1 |
License
Derived from pyannote models:
- pyannote/segmentation-3.0: MIT License, copyright CNRS
- pyannote/wespeaker-voxceleb-resnet34-LM: CC BY 4.0
- pyannote/speaker-diarization-community-1: CC BY 4.0
Changes: exported to safetensors and ONNX, converted to Core ML (including FP16 and W8A16 variants), and PLDA parameters extracted for speakrs. Credit: pyannote.audio by Hervé Bredin and contributors, and WeSpeaker.
Model tree for avencera/speakrs-models
Base model
pyannote/segmentation-3.0