From 5c682f47910d224671f59fde13031c6b685bb338 Mon Sep 17 00:00:00 2001 From: gonzalo-cordova-pou Date: Sat, 18 Apr 2026 00:42:27 +0200 Subject: [PATCH 1/5] Switch diarization model in Emilia to pyannote community-1 --- preprocessors/Emilia/README.md | 4 ++-- preprocessors/Emilia/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/preprocessors/Emilia/README.md b/preprocessors/Emilia/README.md index e242ad152..3ccd62bae 100644 --- a/preprocessors/Emilia/README.md +++ b/preprocessors/Emilia/README.md @@ -75,7 +75,7 @@ The Emilia-Pipe includes the following major steps: 3. Download the model files from the third-party repositories. - Manually download the checkpoints of UVR-MDX-NET-Inst_HQ_3 ([UVR-MDX-NET-Inst_3.onnx](https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/UVR-MDX-NET-Inst_HQ_3.onnx)) and DNSMOS P.835 ([sig_bak_ovr.onnx](https://github.com/microsoft/DNS-Challenge/blob/master/DNSMOS/DNSMOS/sig_bak_ovr.onnx)), then save their path for the next step configuration (i.e. #2 and #3 TODO). - - Creat the access token to pyannote/speaker-diarization-3.1 following [the guide](https://huggingface.co/pyannote/speaker-diarization-3.1#requirements), then save it for the next step configuration (i.e. #4 TODO). + - Creat the access token to pyannote/speaker-diarization-community-1 following [the guide](https://huggingface.co/pyannote/speaker-diarization-community-1), then save it for the next step configuration (i.e. #4 TODO). - Make sure you have stable connection to GitHub and HuggingFace. The checkpoints of Silero and Whisperx-medium will be downloaded automatically on the pipeline's first run. @@ -175,7 +175,7 @@ Here are some potential improvements for the Emilia-Pipe pipeline: We acknowledge the wonderful work by these excellent developers! - Source Separation: [UVR-MDX-NET-Inst_HQ_3](https://github.com/TRvlvr/model_repo/releases/tag/all_public_uvr_models) - VAD: [snakers4/silero-vad](https://github.com/snakers4/silero-vad) -- Speaker Diarization: [pyannote/speaker-diarization-3.1](https://huggingface.co/pyannote/speaker-diarization-3.1) +- Speaker Diarization: [pyannote/speaker-diarization-community-1](https://huggingface.co/pyannote/speaker-diarization-community-1) - ASR: [m-bain/whisperX](https://github.com/m-bain/whisperX), using [faster-whisper](https://github.com/guillaumekln/faster-whisper) and [CTranslate2](https://github.com/OpenNMT/CTranslate2) backend. - DNSMOS Prediction: [DNSMOS P.835](https://github.com/microsoft/DNS-Challenge) diff --git a/preprocessors/Emilia/main.py b/preprocessors/Emilia/main.py index cd6f7eab9..ef02d4ac4 100755 --- a/preprocessors/Emilia/main.py +++ b/preprocessors/Emilia/main.py @@ -524,7 +524,7 @@ def main_process(audio_path, save_path=None, audio_name=None): "Remeber grant access following https://github.com/pyannote/pyannote-audio?tab=readme-ov-file#tldr" ) dia_pipeline = Pipeline.from_pretrained( - "pyannote/speaker-diarization-3.1", + "pyannote/speaker-diarization-community-1", use_auth_token=cfg["huggingface_token"], ) dia_pipeline.to(device) From f08e49bff494a1b95275d4be5efb0718a64ba058 Mon Sep 17 00:00:00 2001 From: gonzalo-cordova-pou Date: Sat, 18 Apr 2026 01:19:20 +0200 Subject: [PATCH 2/5] docs: update python=3.9 to 3.10 in readme --- preprocessors/Emilia/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preprocessors/Emilia/README.md b/preprocessors/Emilia/README.md index 3ccd62bae..6f0201e3f 100644 --- a/preprocessors/Emilia/README.md +++ b/preprocessors/Emilia/README.md @@ -67,7 +67,7 @@ The Emilia-Pipe includes the following major steps: 2. Run the following commands to install the required packages: ```bash - conda create -y -n AudioPipeline python=3.9 + conda create -y -n AudioPipeline python=3.10 conda activate AudioPipeline bash env.sh From 7f4ad0de7fc2883b2bd5e977e3513bc3fb7489ff Mon Sep 17 00:00:00 2001 From: gonzalo-cordova-pou Date: Sat, 18 Apr 2026 01:19:59 +0200 Subject: [PATCH 3/5] add compatibility with pyannote.audio 4.x --- preprocessors/Emilia/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/preprocessors/Emilia/main.py b/preprocessors/Emilia/main.py index ef02d4ac4..532a5536e 100755 --- a/preprocessors/Emilia/main.py +++ b/preprocessors/Emilia/main.py @@ -4,6 +4,7 @@ # LICENSE file in the root directory of this source tree. import argparse +import inspect import json import librosa import numpy as np @@ -151,6 +152,10 @@ def speaker_diarization(audio): "channel": 0, } ) + # pyannote.audio 4.x returns a rich output object with speaker_diarization. + # Legacy versions return Annotation directly. + if hasattr(segments, "speaker_diarization"): + segments = segments.speaker_diarization diarize_df = pd.DataFrame( segments.itertracks(yield_label=True), @@ -523,9 +528,13 @@ def main_process(audio_path, save_path=None, audio_name=None): "You can get the token at https://huggingface.co/settings/tokens. " "Remeber grant access following https://github.com/pyannote/pyannote-audio?tab=readme-ov-file#tldr" ) + from_pretrained_params = inspect.signature(Pipeline.from_pretrained).parameters + auth_kwarg = ( + "token" if "token" in from_pretrained_params else "use_auth_token" + ) dia_pipeline = Pipeline.from_pretrained( "pyannote/speaker-diarization-community-1", - use_auth_token=cfg["huggingface_token"], + **{auth_kwarg: cfg["huggingface_token"]}, ) dia_pipeline.to(device) From 60c397dcb1c644879b0694f845929a05b6af1de0 Mon Sep 17 00:00:00 2001 From: gonzalo-cordova-pou Date: Sat, 18 Apr 2026 01:21:51 +0200 Subject: [PATCH 4/5] fix: typo in readme --- preprocessors/Emilia/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preprocessors/Emilia/README.md b/preprocessors/Emilia/README.md index 6f0201e3f..9c4834000 100644 --- a/preprocessors/Emilia/README.md +++ b/preprocessors/Emilia/README.md @@ -75,7 +75,7 @@ The Emilia-Pipe includes the following major steps: 3. Download the model files from the third-party repositories. - Manually download the checkpoints of UVR-MDX-NET-Inst_HQ_3 ([UVR-MDX-NET-Inst_3.onnx](https://github.com/TRvlvr/model_repo/releases/download/all_public_uvr_models/UVR-MDX-NET-Inst_HQ_3.onnx)) and DNSMOS P.835 ([sig_bak_ovr.onnx](https://github.com/microsoft/DNS-Challenge/blob/master/DNSMOS/DNSMOS/sig_bak_ovr.onnx)), then save their path for the next step configuration (i.e. #2 and #3 TODO). - - Creat the access token to pyannote/speaker-diarization-community-1 following [the guide](https://huggingface.co/pyannote/speaker-diarization-community-1), then save it for the next step configuration (i.e. #4 TODO). + - Create the access token to pyannote/speaker-diarization-community-1 following [the guide](https://huggingface.co/pyannote/speaker-diarization-community-1), then save it for the next step configuration (i.e. #4 TODO). - Make sure you have stable connection to GitHub and HuggingFace. The checkpoints of Silero and Whisperx-medium will be downloaded automatically on the pipeline's first run. From e35baa301503990b6e7d96169f2fe7bdfcc4d5ec Mon Sep 17 00:00:00 2001 From: gonzalo-cordova-pou Date: Tue, 12 May 2026 17:12:12 +0200 Subject: [PATCH 5/5] fix: black format --- preprocessors/Emilia/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/preprocessors/Emilia/main.py b/preprocessors/Emilia/main.py index 532a5536e..20eaee175 100755 --- a/preprocessors/Emilia/main.py +++ b/preprocessors/Emilia/main.py @@ -529,9 +529,7 @@ def main_process(audio_path, save_path=None, audio_name=None): "Remeber grant access following https://github.com/pyannote/pyannote-audio?tab=readme-ov-file#tldr" ) from_pretrained_params = inspect.signature(Pipeline.from_pretrained).parameters - auth_kwarg = ( - "token" if "token" in from_pretrained_params else "use_auth_token" - ) + auth_kwarg = "token" if "token" in from_pretrained_params else "use_auth_token" dia_pipeline = Pipeline.from_pretrained( "pyannote/speaker-diarization-community-1", **{auth_kwarg: cfg["huggingface_token"]},