đ Speaker segmentation
This open - source model is designed for speaker segmentation, offering solutions for voice activity detection, overlapped speech detection, and resegmentation.
Using this open - source model in production?
Consider switching to pyannoteAI for better and faster options.
Paper | Demo | Blog post

đ Quick Start
Relies on pyannote.audio 2.1.1: see installation instructions.
đģ Usage Examples
Basic Usage
from pyannote.audio import Model
model = Model.from_pretrained("pyannote/segmentation",
use_auth_token="ACCESS_TOKEN_GOES_HERE")
Advanced Usage
Voice activity detection
from pyannote.audio.pipelines import VoiceActivityDetection
pipeline = VoiceActivityDetection(segmentation=model)
HYPER_PARAMETERS = {
"onset": 0.5, "offset": 0.5,
"min_duration_on": 0.0,
"min_duration_off": 0.0
}
pipeline.instantiate(HYPER_PARAMETERS)
vad = pipeline("audio.wav")
Overlapped speech detection
from pyannote.audio.pipelines import OverlappedSpeechDetection
pipeline = OverlappedSpeechDetection(segmentation=model)
pipeline.instantiate(HYPER_PARAMETERS)
osd = pipeline("audio.wav")
Resegmentation
from pyannote.audio.pipelines import Resegmentation
pipeline = Resegmentation(segmentation=model,
diarization="baseline")
pipeline.instantiate(HYPER_PARAMETERS)
resegmented_baseline = pipeline({"audio": "audio.wav", "baseline": baseline})
Raw scores
from pyannote.audio import Inference
inference = Inference(model)
segmentation = inference("audio.wav")
đ Documentation
Citation
@inproceedings{Bredin2021,
Title = {{End-to-end speaker segmentation for overlap-aware resegmentation}},
Author = {{Bredin}, Herv{\'e} and {Laurent}, Antoine},
Booktitle = {Proc. Interspeech 2021},
Address = {Brno, Czech Republic},
Month = {August},
Year = {2021},
@inproceedings{Bredin2020,
Title = {{pyannote.audio: neural building blocks for speaker diarization}},
Author = {{Bredin}, Herv{\'e} and {Yin}, Ruiqing and {Coria}, Juan Manuel and {Gelly}, Gregory and {Korshunov}, Pavel and {Lavechin}, Marvin and {Fustes}, Diego and {Titeux}, Hadrien and {Bouaziz}, Wassim and {Gill}, Marie-Philippe},
Booktitle = {ICASSP 2020, IEEE International Conference on Acoustics, Speech, and Signal Processing},
Address = {Barcelona, Spain},
Month = {May},
Year = {2020},
}
Reproducible research
In order to reproduce the results of the paper "End-to-end speaker segmentation for overlap-aware resegmentation", use pyannote/segmentation@Interspeech2021
with the following hyper - parameters:
Property |
AMI Mix - Headset |
DIHARD3 |
VoxConverse |
Voice activity detection - onset |
0.684 |
0.767 |
0.767 |
Voice activity detection - offset |
0.577 |
0.377 |
0.713 |
Voice activity detection - min_duration_on |
0.181 |
0.136 |
0.182 |
Voice activity detection - min_duration_off |
0.037 |
0.067 |
0.501 |
Overlapped speech detection - onset |
0.448 |
0.430 |
0.587 |
Overlapped speech detection - offset |
0.362 |
0.320 |
0.426 |
Overlapped speech detection - min_duration_on |
0.116 |
0.091 |
0.337 |
Overlapped speech detection - min_duration_off |
0.187 |
0.144 |
0.112 |
Resegmentation of VBx - onset |
0.542 |
0.592 |
0.537 |
Resegmentation of VBx - offset |
0.527 |
0.489 |
0.724 |
Resegmentation of VBx - min_duration_on |
0.044 |
0.163 |
0.410 |
Resegmentation of VBx - min_duration_off |
0.705 |
0.182 |
0.563 |
Expected outputs (and VBx baseline) are also provided in the /reproducible_research
sub - directories.
đ License
This project is licensed under the MIT license.
â ī¸ Important Note
The collected information will help acquire a better knowledge of pyannote.audio userbase and help its maintainers apply for grants to improve it further. If you are an academic researcher, please cite the relevant papers in your own publications using the model. If you work for a company, please consider contributing back to pyannote.audio development (e.g. through unrestricted gifts). We also provide scientific consulting services around speaker diarization and machine listening.
đĄ Usage Tip
You need to visit hf.co/pyannote/segmentation and accept user conditions, then visit hf.co/settings/tokens to create an access token before using the model.