### Python: Load and Apply Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/697d955b920962af5222389ac6158407a73d2807/README_code=true Loads the pre-trained DiariZen diarization pipeline from Hugging Face and applies it to an audio file. It iterates through the diarization results, printing start time, end time, and speaker labels. This snippet requires the `diarizen` library. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` -------------------------------- ### Python: Apply Diarization Pipeline with DiariZen Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/50167e9a5243663ff51777823ff7d53da7b87166/README This Python code demonstrates how to load the pre-trained DiariZen diarization pipeline from Hugging Face and apply it to an audio file. It shows how to iterate through the diarization results, printing the start time, end time, and speaker label for each turn. It also includes an example of saving the RTTM results to a specified directory. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Apply Speaker Diarization Pipeline in Python Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/8393d51d9f2f3b07829e76bf0c150cff93b2e2a7/README_code=true This Python code demonstrates how to load the pre-trained DiariZen pipeline and apply it to an audio file for speaker diarization. It shows how to iterate through the results to print the start and end times of each speaker turn. Dependencies include the diarization library. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python: Load and Use Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/bb97a1a74e37ab398177e4858ac6b3f90a9e4435 Loads a pre-trained speaker diarization pipeline from Hugging Face and applies it to an audio file. It prints the diarization results, including start and end times for each speaker turn. Dependencies include the 'diarizen' library. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Apply Diarization Pipeline with BUT-FIT Model Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/50167e9a5243663ff51777823ff7d53da7b87166/README_code=true This Python code demonstrates how to load the pre-trained BUT-FIT diarization pipeline and apply it to an audio file. It shows how to iterate through the diarization results and print the start time, end time, and speaker label for each turn. It also includes an example of how to save the results to an RTTM file. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Use Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/7030f2c7fe847c49b2390511bb4c3f8b90dbc022 Example of how to use the diarization pipeline with an audio file. It takes the audio file path and an optional session name as input and returns diarization results. ```python from pyannote.audio import Pipeline diar_pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1", use_auth_token=True) diar_results = diar_pipeline("audio.wav", sess_name="session_name") ``` -------------------------------- ### Python: Apply Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/0eeef3f7d56cf4725f06dc6247caa903976fed20/README_code=true Demonstrates how to load the pre-trained DiariZen pipeline and apply it to an audio file for speaker diarization. It shows how to iterate through the results and print the start time, end time, and speaker label for each turn. It also shows how to save the RTTM results to a specified directory. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python Diarization Pipeline Inference Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/4d621ac18563daf7dd331013f7698af4f6a44a15/README_code=true Loads a pre-trained diarization pipeline and applies it to an audio file. The results, which include speaker turn information, are then printed. This functionality requires the 'diarizen' library. Outputs formatted speaker turn start and end times. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` -------------------------------- ### Python: Apply BUT-FIT Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/ec909636037371a77cbc839801866a96af8cd674/README_code=true This Python code demonstrates how to load and use the pre-trained BUT-FIT diarization pipeline. It shows how to apply the pipeline to an audio file and iterate through the diarization results, printing start time, end time, and speaker labels. An alternative usage is also shown for saving the RTTM results to a specified directory. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Apply DiariZen Speaker Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/raw/6766c0e696dcad4d9b098d6540457535b0bc60d4/README This snippet demonstrates how to load the pre-trained DiariZen pipeline and apply it to an audio file for speaker diarization. It shows how to iterate through the diarization results and print the start time, end time, and speaker label for each turn. The pipeline requires the 'diarizen' library and the audio file path as input. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` -------------------------------- ### Load and Use Diarization Pipeline (Python) Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/967688a4ada8eddb707d75d80e1b72aa5b342a38/README_code=true This Python code demonstrates how to load the pre-trained DiariZen pipeline and apply it to an audio file for speaker diarization. It shows how to iterate through the diarization results and print the start time, end time, and speaker label for each turn. An option to save the results in RTTM format is also provided. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python: Apply Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/raw/ec909636037371a77cbc839801866a96af8cd674/README This Python code demonstrates how to load the pre-trained DiariZen pipeline from Hugging Face and apply it to an audio file for speaker diarization. It iterates through the results, printing the start time, end time, and speaker label for each detected turn. Dependencies include the `diarizen` library. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` ```python # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python: Speaker Diarization Pipeline with DiariZen Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/4d621ac18563daf7dd331013f7698af4f6a44a15/README Demonstrates how to load and use the DiariZen speaker diarization pipeline. It shows how to process an audio file, iterate through the diarization results (start time, end time, speaker label), and optionally save the results in RTTM format. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python: Load and Apply DiariZen Speaker Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/1f0552449f9c82d89fad52f8c0eb1db7e81f00a6/README Demonstrates how to load the pre-trained DiariZen speaker diarization model from Hugging Face and apply it to an audio file. It also shows how to iterate through the diarization results and print the start time, end time, and speaker label for each turn. Additionally, it shows how to save the results in RTTM format. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Load and Use DiariZen Pipeline for Speaker Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/0eeef3f7d56cf4725f06dc6247caa903976fed20/README This Python code demonstrates how to load the pre-trained DiariZen pipeline from Hugging Face and apply it to an audio file for speaker diarization. It shows how to iterate through the results and print the start time, end time, and speaker label for each turn. It also shows how to save the results in RTTM format. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python Speaker Diarization Pipeline Inference Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/fa68ee044400f20f7dba3f755c5d15f2a150c351/README Loads a pre-trained speaker diarization pipeline and applies it to an audio file. It then iterates through the results to print the start time, end time, and speaker label for each segment. This pipeline is built using the DiariZen library and requires the 'diarizen-wavlm-large-md-s80' model. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-md-s80") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") ``` -------------------------------- ### Apply DiariZen Pipeline and Save RTTM Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/raw/6766c0e696dcad4d9b098d6540457535b0bc60d4/README This code example shows how to load the DiariZen speaker diarization pipeline and apply it to an audio file, with the additional functionality of saving the results in the RTTM (Rich Transcription Time Marked) format. The `rttm_out_dir` parameter specifies the directory where the RTTM file will be saved, and `sess_name` can be used to name the session in the RTTM file. ```python # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python: Load and Use Diarization Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/5f93079b8ed44308e4acde08281a6d3f9a479261 This Python code demonstrates how to load the DiariZen diarization pipeline from Hugging Face and use it to process an audio file. It requires the 'wespeaker' library and specifies a session name for the diarization results. The input is an audio file path, and the output is a dictionary containing diarization results. ```python from wespeaker.model.diari_pipeline import DiariZenPipeline diar_pipeline = DiariZenPipeline.from_pretrained("BUTSpeechFIT/diarizen-wavlm-large-s80-md") diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Load and Use Diarization Pipeline (Python) Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/8393d51d9f2f3b07829e76bf0c150cff93b2e2a7 This Python code snippet demonstrates how to load the BUT-FIT diarization pipeline from Hugging Face and apply it to an audio file. It requires the 'diarizen' library and a pre-trained model. The output is a diarization result object. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiariZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') ``` -------------------------------- ### Model Configuration for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/6928a4bf5ca9f7e7da5c8cf3f5c33cea45269102/config This configuration defines the architecture and parameters for the BUT-FIT speaker diarization model. It specifies the model path, WavLM configuration, attention mechanisms, and output layers. Dependencies include PyTorch and the BUT-FIT library. ```ini [model] path = "diarizen.models.eend.model_wavlm_conformer.Model" [model.args] wavlm_src = "wavlm_large_s80_md" wavlm_layer_num = 25 wavlm_feat_dim = 1024 attention_in = 256 ffn_hidden = 1024 num_head = 4 num_layer = 4 dropout = 0.1 chunk_size = 16 use_posi = false output_activate_function = false selected_channel = 0 [inference.args] seg_duration = 16 segmentation_step = 0.1 batch_size = 32 apply_median_filtering = true [clustering.args] method = "VBxClustering" min_speakers = 1 max_speakers = 20 ahc_criterion = "distance" ahc_threshold = 0.6 Fa = 0.07 Fb = 0.8 lda_dim = 128 max_iters = 20 ``` -------------------------------- ### Python: Load Pipeline and Save RTTM Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/697d955b920962af5222389ac6158407a73d2807/README_code=true Loads the pre-trained DiariZen diarization pipeline and applies it to an audio file, saving the results in RTTM format to a specified directory. This functionality is useful for offline processing and analysis. Requires the `diarizen` library. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Python Diarization Pipeline with RTTM Output Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/4d621ac18563daf7dd331013f7698af4f6a44a15/README_code=true Loads a pre-trained diarization pipeline and applies it to an audio file, saving the results in RTTM format to a specified directory. This requires the 'diarizen' library and specifies a session name for the output. Outputs RTTM files. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### BibTeX: Citation for Fine-tuning DiariZen for Compact Speaker Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/1f0552449f9c82d89fad52f8c0eb1db7e81f00a6/README_code=true This BibTeX entry provides the citation for the research paper detailing the fine-tuning strategy for DiariZen models, focusing on achieving compact and accurate self-supervised models for speaker diarization through structured pruning. It is relevant for academic use. ```bibtex @article{han2025fine, title={Fine-tune Before Structured Pruning: Towards Compact and Accurate Self-Supervised Models for Speaker Diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Cernocky, Jan and Burget, Lukas}, journal={arXiv preprint arXiv:2505.24111}, year={2025} } ``` -------------------------------- ### BibTeX Citation for DiariZen Model Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/5f93079b8ed44308e4acde08281a6d3f9a479261/README_code=true This BibTeX entry provides the citation details for the DiariZen model, useful for academic referencing. It includes information on the authors, title, and publication venue (ICASSP and INTERSPEECH) for the two associated papers. ```bibtex @inproceedings{han2025leveraging, title={Leveraging self-supervised learning for speaker diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{'a}{\v{s}}}, booktitle={Proc. ICASSP}, year={2025} } @inproceedings{han2025finetunestructuredpruningcompact, title={Fine-tune Before Structured Pruning: Towards Compact and Accurate Self-Supervised Models for Speaker Diarization}, author={Jiangyu Han and Federico Landini and Johan Rohdin and Anna Silnova and Mireia Diez and Jan Cernocky and Lukas Burget}, booktitle={Proc. INTERSPEECH}, year={2025} } ``` -------------------------------- ### Python Diarization Pipeline Usage Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/raw/5f93079b8ed44308e4acde08281a6d3f9a479261/README This Python code demonstrates how to load and use the DiariZen speaker diarization pipeline. It shows how to apply the pipeline to an audio file, iterate through the diarization results, and save results to an RTTM file. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model diar_pipeline = DiarZenPipeline.from_pretrained("BUT-FIT/diarizen-wavlm-large-s80-md") # apply diarization pipeline diar_results = diar_pipeline('audio.wav') # print results for turn, _, speaker in diar_results.itertracks(yield_label=True): print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}") # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Model Configuration for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/b2835949f7e07098b0871d138d4f8b17182d2762/config This configuration defines the parameters for the BUT-FIT diarization model, specifying the model path, arguments for the WAVLM encoder, and settings for inference and speaker clustering. It includes details on segment duration, batch size, and clustering thresholds. ```toml [model] path = "diarizen.models.eend.model_wavlm_conformer.Model" [model.args] wavlm_src = "wavlm_large_md_s80" wavlm_layer_num = 25 wavlm_feat_dim = 1024 attention_in = 256 ffn_hidden = 1024 num_head = 4 num_layer = 4 dropout = 0.1 chunk_size = 16 use_posi = false output_activate_function = false selected_channel = 0 [inference.args] seg_duration = 16 segmentation_step = 0.1 batch_size = 32 apply_median_filtering = true [clustering.args] merge_delta = 0.5 merge_max_length = 50 min_speakers = 1 max_speakers = 20 min_cluster_size = 16 cluster_threshold = 0.6647095879538272 merge_until_large = true ``` -------------------------------- ### BibTeX: Citation for DiariZen Speaker Diarization Models Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/1f0552449f9c82d89fad52f8c0eb1db7e81f00a6/README_code=true This BibTeX entry provides the citation details for the research paper related to the DiariZen model, specifically focusing on leveraging self-supervised learning for speaker diarization. This citation is useful for academic referencing when using or discussing the model. ```bibtex @inproceedings{han2025leveraging, title={Leveraging self-supervised learning for speaker diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{'a}{\v{s}}}, booktitle={Proc. ICASSP}, year={2025} } ``` -------------------------------- ### Model Configuration for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/fa68ee044400f20f7dba3f755c5d15f2a150c351/config This configuration block defines the architecture and parameters for the WavLM-based speaker diarization model. It specifies the model path, WavLM source, layer details, attention mechanisms, and dropout rates. ```yaml [model] path = "diarizen.models.eend.model_wavlm_conformer.Model" [model.args] wavlm_src = "wavlm_large_md_s80" wavlm_layer_num = 25 wavlm_feat_dim = 1024 attention_in = 256 ffn_hidden = 1024 num_head = 4 num_layer = 4 dropout = 0.1 chunk_size = 16 use_posi = false output_activate_function = false selected_channel = 0 ``` -------------------------------- ### BibTeX: DiariZen Model Citations Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/65a00e32d5d4c172afa97217f2626980b68ff829/README_code=true Provides the BibTeX entries for citing the DiariZen project and related research papers. These citations are useful for academic work that utilizes or references this speaker diarization model. ```bibtex @inproceedings{han2025leveraging, title={Leveraging self-supervised learning for speaker diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{'a}{\v{s}}}, booktitle={Proc. ICASSP}, year={2025} } @article{han2025fine, title={Fine-tune Before Structured Pruning: Towards Compact and Accurate Self-Supervised Models for Speaker Diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Cernocky, Jan and Burget, Lukas}, journal={arXiv preprint arXiv:2505.24111}, year={2025} } @article{han2025efficient, title={Efficient and Generalizable Speaker Diarization via Structured Pruning of Self-Supervised Models}, 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}}}, journal={arXiv preprint arXiv:2506.18623}, year={2025} } ``` -------------------------------- ### BUT-FIT Diarization Model Configuration (TOML) Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/50167e9a5243663ff51777823ff7d53da7b87166/config This TOML configuration defines the parameters for the BUT-FIT diarization model, including the model path, WavLM arguments, inference settings like segmentation duration and batch size, and clustering options such as clustering method and speaker limits. ```toml [model] path = "diarizen.models.eend.model_wavlm_conformer.Model" [model.args] wavlm_src = "wavlm_large_md_s80" wavlm_layer_num = 25 wavlm_feat_dim = 1024 attention_in = 256 ffn_hidden = 1024 num_head = 4 num_layer = 4 dropout = 0.1 chunk_size = 16 use_posi = false output_activate_function = false selected_channel = 0 [inference.args] seg_duration = 16 segmentation_step = 0.1 batch_size = 32 apply_median_filtering = true [clustering.args] method = "VBxClustering" merge_delta = 0.5 merge_max_length = 50 min_speakers = 1 max_speakers = 20 ahc_criterion = "distance" ahc_threshold = 0.6 Fa = 0.07 Fb = 0.8 lda_dim = 128 max_iters = 20 ``` -------------------------------- ### BibTeX: Citation for Efficient DiariZen Speaker Diarization via Pruning Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/1f0552449f9c82d89fad52f8c0eb1db7e81f00a6/README_code=true This BibTeX entry cites the research paper on efficient and generalizable speaker diarization using DiariZen, which employs structured pruning of self-supervised models. This is important for academic references when discussing the model's efficiency and generalization capabilities. ```bibtex @article{han2025efficient, title={Efficient and Generalizable Speaker Diarization via Structured Pruning of Self-Supervised Models}, 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}}}, journal={arXiv preprint arXiv:2506.18623}, year={2025} } ``` -------------------------------- ### Citation for DiariZen Models Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/6766c0e696dcad4d9b098d6540457535b0bc60d4/README_code=true This section provides the citation details for the DiariZen models, including academic papers published in ICASSP and arXiv. These citations should be used when referencing the work in publications or research. ```bibtex @inproceedings{han2025leveraging, title={Leveraging self-supervised learning for speaker diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{'a}{\v{s}}}, booktitle={Proc. ICASSP}, year={2025} } @article{han2025fine, title={Fine-tune Before Structured Pruning: Towards Compact and Accurate Self-Supervised Models for Speaker Diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Cernocky, Jan and Burget, Lukas}, journal={arXiv preprint arXiv:2505.24111}, year={2025} } @article{han2025efficient, title={Efficient and Generalizable Speaker Diarization via Structured Pruning of Self-Supervised Models}, author={Han, Jiangyu and P{'a}lka, Petr and Delcroix, Marc and Landini, Federico and Rohdin, Johan and Cernocky, Jan and Burget, Luk{'a}{\v{s}}}, journal={arXiv preprint arXiv:2506.18623}, year={2025} } ``` -------------------------------- ### Load and Use Diarization Pipeline with RTTM Output (Python) Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/8393d51d9f2f3b07829e76bf0c150cff93b2e2a7 This Python code demonstrates loading the BUT-FIT diarization pipeline and saving the results in RTTM format. It utilizes the 'diarizen' library and specifies an output directory for the RTTM file. The function from_pretrained is used with the model name and the rttm_out_dir argument. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline ``` -------------------------------- ### Speaker Diarization with pyannote.audio Pipeline Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/commit/563ea649c3cec998dea3424101c390bd39490183 This snippet demonstrates how to use the pyannote.audio pipeline for speaker diarization. It takes an audio file and a session name as input and returns diarization results. The pipeline is likely configured with the BUT-FIT model for accurate speaker segmentation. ```python # Assuming diar_pipeline is pre-configured with the BUT-FIT model diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Clustering Parameters for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/fa68ee044400f20f7dba3f755c5d15f2a150c351/config This section outlines the parameters used for clustering speaker segments in the diarization process. It includes settings for merging segments, minimum and maximum speaker counts, cluster size, and thresholding. ```yaml [clustering.args] merge_delta = 0.5 merge_max_length = 50 min_speakers = 1 max_speakers = 20 min_cluster_size = 16 cluster_threshold = 0.6647095879538272 merge_until_large = true ``` -------------------------------- ### Python Speaker Diarization Pipeline with RTTM Output Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/fa68ee044400f20f7dba3f755c5d15f2a150c351/README Loads a pre-trained speaker diarization pipeline and applies it to an audio file, saving the results in RTTM format. The pipeline can save the RTTM output to a specified directory. This functionality requires the 'diarizen-wavlm-large-md-s80' model and the DiariZen library. ```python # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Inference Settings for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/fa68ee044400f20f7dba3f755c5d15f2a150c351/config These settings configure the inference process for the speaker diarization model. They include parameters for segmentation duration and step, batch size, and median filtering application. ```yaml [inference.args] seg_duration = 16 segmentation_step = 0.1 batch_size = 32 apply_median_filtering = true ``` -------------------------------- ### Model Configuration for BUT-FIT Diarization Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blame/4d621ac18563daf7dd331013f7698af4f6a44a15/config This configuration defines the parameters for the BUT-FIT diarization model, including the WavLM base model, transformer architecture details, and inference settings. It specifies the WavLM source, layer number, feature dimensions, attention mechanisms, and dropout rates. Inference arguments control segmentation duration, step, batch size, and median filtering. Clustering arguments define the clustering method, speaker number limits, and various VBxClustering parameters. ```toml [model] path = "diarizen.models.eend.model_wavlm_conformer.Model" [model.args] wavlm_src = "wavlm_large_md_s80" wavlm_layer_num = 25 wavlm_feat_dim = 1024 attention_in = 256 ffn_hidden = 1024 num_head = 4 num_layer = 4 dropout = 0.1 chunk_size = 16 use_posi = false output_activate_function = false selected_channel = 0 [inference.args] seg_duration = 16 segmentation_step = 0.1 batch_size = 32 apply_median_filtering = true [clustering.args] method = "VBxClustering" merge_delta = 0.5 merge_max_length = 50 min_speakers = 1 max_speakers = 20 ahc_threshold = -1 min_cluster_size = -1 vbx_ahc_criterion = "distance" vbx_ahc_threshold = 0.6 Fa = 0.07 Fb = 0.8 lda_dim = 128 max_iters = 20 ``` -------------------------------- ### Save RTTM Results with DiariZen Pipeline in Python Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/raw/967688a4ada8eddb707d75d80e1b72aa5b342a38/README This Python code shows how to load the DiariZen diarization pipeline and configure it to save the diarization results directly as an RTTM file. It takes an audio file and a session name as input for processing and RTTM output. ```python from diarizen.pipelines.inference import DiariZenPipeline # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-s80-md", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### Apply Speaker Diarization and Save RTTM (Python) Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/97ff5461351b61b1ba3e713b125d58d257e3e5dd/README_code=true Loads a pre-trained speaker diarization pipeline and applies it to an audio file, saving the results in RTTM (Rich Transcription Time Marked) format to a specified directory. This is useful for generating standard speaker diarization output files for further analysis or integration with other tools. ```python # load pre-trained model and save RTTM result diar_pipeline = DiariZenPipeline.from_pretrained( "BUT-FIT/diarizen-wavlm-large-md-s80", rttm_out_dir='.' ) # apply diarization pipeline diar_results = diar_pipeline('audio.wav', sess_name='session_name') ``` -------------------------------- ### BibTeX: DiariZen Citation Source: https://huggingface.co/BUT-FIT/diarizen-wavlm-large-s80-md/blob/a3d6bd38d3ba4f952c2a95970265f5d66e2d48cd/README_code=true This is a BibTeX entry for citing the DiariZen work, specifically referencing the ICASSP publication. It includes author information, title, venue, and year. This format is commonly used in academic writing for bibliographies. ```bibtex @inproceedings{han2025leveraging, title={Leveraging self-supervised learning for speaker diarization}, author={Han, Jiangyu and Landini, Federico and Rohdin, Johan and Silnova, Anna and Diez, Mireia and Burget, Luk{'a}{v{s}}}, booktitle={Proc. ICASSP}, year={2025} } ```