Views
No views yet
1# 1. visit hf.co/pyannote/speaker-diarization and accept user conditions
2# 2. visit hf.co/pyannote/segmentation and accept user conditions
3# 3. visit hf.co/settings/tokens to create an access token
4# 4. instantiate pretrained speaker diarization pipeline
5from pyannote.audio import Pipeline
6pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1",
7 use_auth_token="ACCESS_TOKEN_GOES_HERE")
8
9
10# apply the pipeline to an audio file
11diarization = pipeline("audio.wav")
12
13# dump the diarization output to disk using RTTM format
14with open("audio.rttm", "w") as rttm:
15 diarization.write_rttm(rttm)num_speakers option:diarization = pipeline("audio.wav", num_speakers=2)min_speakers and max_speakers options:diarization = pipeline("audio.wav", min_speakers=2, max_speakers=5)| Benchmark | DER% | FA% | Miss% | Conf% | Expected output | File-level evaluation |
|---|---|---|---|---|---|---|
| AISHELL-4 | 14.09 | 5.17 | 3.27 | 5.65 | RTTM | eval |
| Albayzin (RTVE 2022) | 25.60 | 5.58 | 6.84 | 13.18 | RTTM | eval |
| AliMeeting (channel 1) | 27.42 | 4.84 | 14.00 | 8.58 | RTTM | eval |
| AMI (headset mix, only_words) | 18.91 | 4.48 | 9.51 | 4.91 | RTTM | eval |
| AMI (array1, channel 1, only_words) | 27.12 | 4.11 | 17.78 | 5.23 | RTTM | eval |
| CALLHOME (part2) | 32.37 | 6.30 | 13.72 | 12.35 | RTTM | eval |
| DIHARD 3 (Full) | 26.94 | 10.50 | 8.41 | 8.03 | RTTM | eval |
| Ego4D v1 (validation) | 63.99 | 3.91 | 44.42 | 15.67 | RTTM | eval |
| REPERE (phase 2) | 8.17 | 2.23 | 2.49 | 3.45 | RTTM | eval |
| This American Life | 20.82 | 2.03 | 11.89 | 6.90 | RTTM | eval |
| VoxConverse (v0.3) | 11.24 | 4.42 | 2.88 | 3.94 | RTTM | eval |
2.1 of pyannote.audio speaker diarization pipeline.1@inproceedings{Bredin2021,
2 Title = {{End-to-end speaker segmentation for overlap-aware resegmentation}},
3 Author = {{Bredin}, Herv{\'e} and {Laurent}, Antoine},
4 Booktitle = {Proc. Interspeech 2021},
5 Address = {Brno, Czech Republic},
6 Month = {August},
7 Year = {2021},
8}1@inproceedings{Bredin2020,
2 Title = {{pyannote.audio: neural building blocks for speaker diarization}},
3 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},
4 Booktitle = {ICASSP 2020, IEEE International Conference on Acoustics, Speech, and Signal Processing},
5 Address = {Barcelona, Spain},
6 Month = {May},
7 Year = {2020},
8}