Jyhan003 commited on
Commit
a15954c
·
1 Parent(s): d9dc28a

initial commit

Browse files
Files changed (6) hide show
  1. README.md +85 -0
  2. config.json +3 -0
  3. config.toml +35 -0
  4. plda/plda.npz +3 -0
  5. plda/xvec_transform.npz +3 -0
  6. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ library_name: transformers
4
+ pipeline_tag: voice-activity-detection
5
+ tags:
6
+ - speaker
7
+ - speaker-diarization
8
+ - meeting
9
+ - wavlm
10
+ - wespeaker
11
+ - diarizen
12
+ - pyannote
13
+ - pyannote-audio-pipeline
14
+ ---
15
+
16
+ ## Overview
17
+ This hub features the pre-trained model by [DiariZen](https://github.com/BUTSpeechFIT/DiariZen). The EEND component is built upon WavLM Large and Conformer layers. The model was trained on far-field, single-channel audio from a diverse set of public datasets, including AMI, AISHELL-4, AliMeeting, NOTSOFAR-1, MSDWild, DIHARD3, RAMC, and VoxConverse.
18
+
19
+ Then structured pruning at 80% sparsity is applied. After pruning, the number of parameters in WavLM Large is reduced from **316.6M to 63.3M**, and the computational cost (MACs) decreases from **17.8G to 3.8G** per second. When loading this model, please ensure **non-commercial** usage, in accordance with the CC BY-NC 4.0 license.
20
+
21
+
22
+
23
+ ## Usage
24
+ ```python
25
+ from diarizen.pipelines.inference import DiariZenPipeline
26
+
27
+ # load pre-trained model
28
+ diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md")
29
+ # apply diarization pipeline
30
+ diar_results = diar_pipeline('audio.wav')
31
+
32
+ # print results
33
+ for turn, _, speaker in diar_results.itertracks(yield_label=True):
34
+ print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}")
35
+
36
+ # load pre-trained model and save RTTM result
37
+ diar_pipeline = DiariZenPipeline.from_pretrained(
38
+ "BUT-FIT/diarizen-wavlm-large-s80-md",
39
+ rttm_out_dir='.'
40
+ )
41
+ # apply diarization pipeline
42
+ diar_results = diar_pipeline('audio.wav', sess_name='session_name')
43
+ ```
44
+
45
+ ## Results (collar=0s)
46
+ | Dataset | [Pyannote v3.1](https://github.com/pyannote/pyannote-audio) | DiariZen |
47
+ |:---------------|:-----------:|:-----------:|
48
+ | AMI | 22.4 | 13.9 |
49
+ | AISHELL-4 | 12.2 | 10.1 |
50
+ | AliMeeting | 24.4 | 10.8 |
51
+ | NOTSOFAR-1 | - | 16.7 |
52
+ | MSDWild | 25.3 | 15.8 |
53
+ | DIHARD3 | 21.7 | 14.5 |
54
+ | RAMC | 22.2 | 11.0 |
55
+ | VoxConverse | 11.3 | 9.1 |
56
+
57
+ ## Citation
58
+ If you found this work helpful, please consider citing:
59
+ ```
60
+ @inproceedings{han2025leveraging,
61
+ title={Leveraging self-supervised learning for speaker diarization},
62
+ author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{\'a}{\v{s}}},
63
+ booktitle={Proc. ICASSP},
64
+ year={2025}
65
+ }
66
+
67
+ @article{han2025fine,
68
+ title={Fine-tune Before Structured Pruning: Towards Compact and Accurate Self-Supervised Models for Speaker Diarization},
69
+ author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Cernocky, Jan and Burget, Lukas},
70
+ journal={arXiv preprint arXiv:2505.24111},
71
+ year={2025}
72
+ }
73
+
74
+ @article{han2025efficient,
75
+ title={Efficient and Generalizable Speaker Diarization via Structured Pruning of Self-Supervised Models},
76
+ author={Han, Jiangyu and P{\'a}lka, Petr and Delcroix, Marc and Landini, Federico and Rohdin, Johan and Cernock{\`y}, Jan and Burget, Luk{\'a}{\v{s}}},
77
+ journal={arXiv preprint arXiv:2506.18623},
78
+ year={2025}
79
+ }
80
+ ```
81
+
82
+ ## License
83
+ - **Source code**: MIT (see the [project’s GitHub repository](https://github.com/BUTSpeechFIT/DiariZen)).
84
+ - **Model weights**: CC BY-NC 4.0 (non-commercial).
85
+ - Rationale: some training datasets are research-only or non-commercial, so the released weights cannot be used commercially.
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "library_name": "transformers"
3
+ }
config.toml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [model]
2
+ path = "diarizen.models.eend.model_wavlm_conformer.Model"
3
+
4
+ [model.args]
5
+ wavlm_src = "wavlm_large_s80_md"
6
+ wavlm_layer_num = 25
7
+ wavlm_feat_dim = 1024
8
+ attention_in = 256
9
+ ffn_hidden = 1024
10
+ num_head = 4
11
+ num_layer = 4
12
+ dropout = 0.1
13
+ chunk_size = 16
14
+ use_posi = false
15
+ output_activate_function = false
16
+ selected_channel = 0
17
+
18
+ [inference.args]
19
+ seg_duration = 16
20
+ segmentation_step = 0.1
21
+ batch_size = 32
22
+ apply_median_filtering = true
23
+
24
+ [clustering.args]
25
+ method = "VBxClustering"
26
+ min_speakers = 1
27
+ max_speakers = 20
28
+ ahc_criterion = "distance"
29
+ ahc_threshold = 0.6
30
+ Fa = 0.07
31
+ Fb = 0.8
32
+ lda_dim = 128
33
+ max_iters = 20
34
+
35
+
plda/plda.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b77bcd840692710dd3496f62ecfeed8d8e5f002fd991b785079b244eab7d255
3
+ size 133852
plda/xvec_transform.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:325f1ce8e48f7e55e9c8aa47e05d2766b7c48c4b25b8de8dd751e7a4cc5fbe8f
3
+ size 134376
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0252b5d926600ad434778a85314f3164601914d36d355cbad3e7e30be968a675
3
+ size 278066342