Views
No views yet
community-1 speaker diarizationpip install pyannote.audiohf.co/settings/tokens.1# download the pipeline from Huggingface
2from pyannote.audio import Pipeline
3pipeline = Pipeline.from_pretrained(
4 "pyannote/speaker-diarization-community-1",
5 token="{huggingface-token}")
6
7# run the pipeline locally on your computer
8output = pipeline("audio.wav")
9
10# print the predicted speaker diarization
11for turn, speaker in output.speaker_diarization:
12 print(f"{speaker} speaks between t={turn.start:.3f}s and t={turn.end:.3f}s")Community-1 is much better than speaker-diarization-3.1.| Benchmark (last updated in 2025-09) | legacy (3.1) | community-1 | precision-2 |
|---|---|---|---|
| AISHELL-4 | 12.2 | 11.7 | 11.4 |
| AliMeeting (channel 1) | 24.5 | 20.3 | 15.2 |
| AMI (IHM) | 18.8 | 17.0 | 12.9 |
| AMI (SDM) | 22.7 | 19.9 | 15.6 |
| AVA-AVD | 49.7 | 44.6 | 37.1 |
| CALLHOME (part 2) | 28.5 | 26.7 | 16.6 |
| DIHARD 3 (full) | 21.4 | 20.2 | 14.7 |
| Ego4D (dev.) | 51.2 | 46.8 | 39.0 |
| MSDWild | 25.4 | 22.8 | 17.3 |
| RAMC | 22.2 | 20.8 | 10.5 |
| REPERE (phase2) | 7.9 | 8.9 | 7.4 |
| VoxConverse (v0.3) | 11.2 | 11.2 | 8.5 |
Precision-2 model is even better and can be tested like this:1from pyannote.audio import Pipeline
2pipeline = Pipeline.from_pretrained(
3- 'pyannote/speaker-diarization-community-1', token="{huggingface-token}")
4+ 'pyannote/speaker-diarization-precision-2', token="{pyannoteAI-api-key}")
5diarization = pipeline("audio.wav") # runs on pyannoteAI serverspyannote.audio pipelines run on CPU by default.
You can send them to GPU with the following lines:1import torch
2pipeline.to(torch.device("cuda"))1waveform, sample_rate = torchaudio.load("audio.wav")
2output = pipeline({"waveform": waveform, "sample_rate": sample_rate})1from pyannote.audio.pipelines.utils.hook import ProgressHook
2with ProgressHook() as hook:
3 output = pipeline("audio.wav", hook=hook)num_speakers option:output = pipeline("audio.wav", num_speakers=2)min_speakers and max_speakers options:output = pipeline("audio.wav", min_speakers=2, max_speakers=5)Community-1 pretrained pipeline returns a new exclusive speaker diarization, on top of the regular speaker diarization, available as output.exclusive_speaker_diarization.1# make sure git-lfs is installed (https://git-lfs.com)
2git lfs install
3
4# create a directory on disk
5mkdir /path/to/directory
6
7# when prompted for a password, use an access token with write permissions.
8# generate one from your settings: https://huggingface.co/settings/tokens
9git clone https://hf.co/pyannote/speaker-diarization-community-1 /path/to/directory/pyannote-speaker-diarization-community-11# load pipeline from disk (works without internet connection)
2from pyannote.audio import Pipeline
3pipeline = Pipeline.from_pretrained('/path/to/directory/pyannote-speaker-diarization-community-1')
4
5# run the pipeline locally on your computer
6output = pipeline("audio.wav")1@inproceedings{Plaquet23,
2 author={Alexis Plaquet and Hervé Bredin},
3 title={{Powerset multi-class cross entropy loss for neural speaker diarization}},
4 year=2023,
5 booktitle={Proc. INTERSPEECH 2023},
6}1@inproceedings{Wang2023,
2 title={Wespeaker: A research and production oriented speaker embedding learning toolkit},
3 author={Wang, Hongji and Liang, Chengdong and Wang, Shuai and Chen, Zhengyang and Zhang, Binbin and Xiang, Xu and Deng, Yanlei and Qian, Yanmin},
4 booktitle={ICASSP 2023, IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
5 pages={1--5},
6 year={2023},
7 organization={IEEE}
8}1@article{Landini2022,
2 author={Landini, Federico and Profant, J{\'a}n and Diez, Mireia and Burget, Luk{\'a}{\v{s}}},
3 title={{Bayesian HMM clustering of x-vector sequences (VBx) in speaker diarization: theory, implementation and analysis on standard tasks}},
4 year={2022},
5 journal={Computer Speech \& Language},
6}pyannote/speaker-diarization-community-1
at commit 3533c8cf8e369892e6b79ff1bf80f7b0286a54ee, mirrored on 2026-08-12 so that it can be fetched without
the upstream access form. No weights, configuration or licence terms were changed;
all credit and the original licence remain with the upstream authors.