10,757
stars
+0+7+129
1,130
forks
83
watchers
630
prs
1,060
issues
18
releases
–
discussions
README
!pyannote.audio social preview
pyannote speaker diarization toolkit
pyannote.audio is an open-source toolkit written in Python for speaker diarization. Based on PyTorch machine learning framework, it comes with state-of-the-art pretrained models and pipelines, that can be further finetuned to your own data for even better performance.
Highlights
- :exploding_head: state-of-the-art performance (see Benchmark)
- :hugs: pretrained pipelines (and models) on :hugs: model hub
- :rocket: built-in support for pyannoteAI premium speaker diarization
- :snake: Python-first API
- :zap: multi-GPU training with pytorch-lightning
community-1 open-source speaker diarization
1. Make sure ffmpeg is installed on your machine (needed by torchcodec audio decoding library)
2. Install with uvadd pyannote.audio (recommended) or pip install pyannote.audio
3. Accept pyannote/speaker-diarization-community-1 user conditions
4. Create Huggingface access token at hf.co/settings/tokens
python
import torch
from pyannote.audio import Pipeline
from pyannote.audio.pipelines.utils.hook import ProgressHook
Community-1 open-source speaker diarization pipeline
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization-community-1", token="HUGGINGFACE_ACCESS_TOKEN"
)
send pipeline to GPU (when available)
pipeline.to(torch.device("cuda"))
apply pretrained pipeline (with optional progress hook)
with ProgressHook() as hook:
output = pipeline("audio.wav", hook=hook) runs locally
print the result
for turn, speaker in output.speaker_diarization:
print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}")
start=0.2s stop=1.5s speaker_0
start=1.8s stop=3.9s speaker_1
start=4.2s stop=5.7s speaker_0
...
precision-2 premium speaker diarization
1. Create pyannoteAI API key at dashboard.pyannote.ai
2. Enjoy free credits!
python
from pyannote.audio import Pipeline
Precision-2 premium speaker diarization service
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization-precision-2", token="PYANNOTEAI_API_KEY"
)
output = pipeline("audio.wav") runs on pyannoteAI servers
print the result
for turn, speaker in output.speaker_diarization:
print(f"start={turn.start:.1f}s stop={turn.end:.1f}s {speaker}")
start=0.2s stop=1.6s SPEAKER_00
start=1.8s stop=4.0s SPEAKER_01
start=4.2s stop=5.6s SPEAKER_00
...
Visit docs.pyannote.ai to learn about other pyannoteAI features (voiceprinting, confidence scores, ...)
Benchmark
| Benchmark (last updated in 2025-09) | legacy (3.1)| community-1 | precision-2 |
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------| ------------------------------------------------ |
| AISHELL-4 | 12.2 | 11.7 | 11.4 |
| AliMeeting (c