pyannote/speaker-diarization-community-1

Hugging Face Models Trending Models

Summary

pyannote 发布 speaker-diarization-community-1 流水线,相比 speaker-diarization-3.1 在说话人分配与计数方面有显著提升,支持离线使用、独家说话人分离以及可选的 pyannoteAI 云端托管。

Task: automatic-speech-recognition Tags: pyannote-audio, pyannote, pyannote-audio-pipeline, audio, voice, speech, speaker, speaker-diarization, speaker-change-detection, voice-activity-detection, overlapped-speech-detection, automatic-speech-recognition, arxiv:2104.03603, arxiv:2111.14448, arxiv:2012.01477, arxiv:2110.07058, license:cc-by-4.0, region:us
Original Article
View Cached Full Text

Cached at: 10/15/26, 06:47 PM

pyannote/speaker-diarization-community-1 · Hugging Face

Source: https://huggingface.co/pyannote/speaker-diarization-community-1 This pipeline ingests mono audio sampled at 16kHz and outputs speaker diarization.

  • stereo or multi-channel audio files are automatically downmixed to mono by averaging the channels.
  • audio files sampled at a different rate are resampled to 16kHz automatically upon loading.

Themain improvements brought byCommunity\-1are:

  • improvedspeaker assignment and counting
  • simpler reconciliation with transcription timestamps withexclusivespeaker diarization
  • easyoffline use(i.e. without internet connection)
  • (optionally)hostedon pyannoteAI cloud

https://huggingface.co/pyannote/speaker-diarization-community-1#setupSetup

  1. pip install pyannote\.audio
  2. Accept user conditions
  3. Create access token athf\.co/settings/tokens.

https://huggingface.co/pyannote/speaker-diarization-community-1#quick-startQuick start

# download the pipeline from Huggingface
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained(
    "pyannote/speaker-diarization-community-1", 
    token="{huggingface-token}")

# run the pipeline locally on your computer
output = pipeline("audio.wav")

# print the predicted speaker diarization 
for turn, speaker in output.speaker_diarization:
    print(f"{speaker} speaks between t={turn.start:.3f}s and t={turn.end:.3f}s")

https://huggingface.co/pyannote/speaker-diarization-community-1#benchmarkBenchmark

Out of the box,Community\-1is much better thanspeaker\-diarization\-3\.1.

We reportdiarization error rates(in %) on large collection of academic benchmarks (fully automatic processing, no forgiveness collar, nor skipping overlapping speech).

Precision\-2model is even better and can be tested like this:

  1. Create an API key onpyannoteAI dashboard(free credits included)
  2. Change one line of code
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained(
-     'pyannote/speaker-diarization-community-1', token="{huggingface-token}")
+     'pyannote/speaker-diarization-precision-2', token="{pyannoteAI-api-key}")
diarization = pipeline("audio.wav")  # runs on pyannoteAI servers

https://huggingface.co/pyannote/speaker-diarization-community-1#processing-on-gpuProcessing on GPU

pyannote\.audiopipelines run on CPU by default. You can send them to GPU with the following lines:

import torch
pipeline.to(torch.device("cuda"))

https://huggingface.co/pyannote/speaker-diarization-community-1#processing-from-memoryProcessing from memory

Pre-loading audio files in memory may result in faster processing:

waveform, sample_rate = torchaudio.load("audio.wav")
output = pipeline({"waveform": waveform, "sample_rate": sample_rate})

https://huggingface.co/pyannote/speaker-diarization-community-1#monitoring-progressMonitoring progress

Hooks are available to monitor the progress of the pipeline:

from pyannote.audio.pipelines.utils.hook import ProgressHook
with ProgressHook() as hook:
    output = pipeline("audio.wav", hook=hook)

https://huggingface.co/pyannote/speaker-diarization-community-1#controlling-the-number-of-speakersControlling the number of speakers

In case the number of speakers is known in advance, one can use thenum\_speakersoption:

output = pipeline("audio.wav", num_speakers=2)

One can also provide lower and/or upper bounds on the number of speakers usingmin\_speakersandmax\_speakersoptions:

output = pipeline("audio.wav", min_speakers=2, max_speakers=5)

https://huggingface.co/pyannote/speaker-diarization-community-1#exclusive-speaker-diarizationExclusive speaker diarization

Community\-1pretrained pipeline returns a newexclusivespeaker diarization, on top of the regular speaker diarization, available asoutput\.exclusive\_speaker\_diarization.

This is a feature which isbackported from our latest commercial modelthat simplifies the reconciliation between fine-grained speaker diarization timestamps and (sometimes not so precise) transcription timestamps.

https://huggingface.co/pyannote/speaker-diarization-community-1#offline-useOffline use

  1. In the terminal, copy the pipeline on disk:
# make sure git-lfs is installed (https://git-lfs.com)
git lfs install

# create a directory on disk
mkdir /path/to/directory

# when prompted for a password, use an access token with write permissions.
# generate one from your settings: https://huggingface.co/settings/tokens
git clone https://hf.co/pyannote/speaker-diarization-community-1 /path/to/directory/pyannote-speaker-diarization-community-1
  1. In Python, use the pipeline without internet connection:
# load pipeline from disk (works without internet connection)
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained('/path/to/directory/pyannote-speaker-diarization-community-1')

# run the pipeline locally on your computer
output = pipeline("audio.wav")

https://huggingface.co/pyannote/speaker-diarization-community-1#citationsCitations

  1. Speaker segmentation model
@inproceedings{Plaquet23,
  author={Alexis Plaquet and Hervé Bredin},
  title={{Powerset multi-class cross entropy loss for neural speaker diarization}},
  year=2023,
  booktitle={Proc. INTERSPEECH 2023},
}
  1. Speaker embedding model
@inproceedings{Wang2023,
  title={Wespeaker: A research and production oriented speaker embedding learning toolkit},
  author={Wang, Hongji and Liang, Chengdong and Wang, Shuai and Chen, Zhengyang and Zhang, Binbin and Xiang, Xu and Deng, Yanlei and Qian, Yanmin},
  booktitle={ICASSP 2023, IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
  pages={1--5},
  year={2023},
  organization={IEEE}
}
  1. Speaker clustering
@article{Landini2022,
  author={Landini, Federico and Profant, J{\'a}n and Diez, Mireia and Burget, Luk{\'a}{\v{s}}},
  title={{Bayesian HMM clustering of x-vector sequences (VBx) in speaker diarization: theory, implementation and analysis on standard tasks}},
  year={2022},
  journal={Computer Speech \& Language},
}

https://huggingface.co/pyannote/speaker-diarization-community-1#acknowledgmentAcknowledgment

Training and tuning made possible thanks toGENCIon theJean Zaysupercomputer.

Similar Articles

rafaelgalle/whisper-diarization-advanced

Replicate Explore

A customizable speech diarization pipeline on Replicate that uses Whisper and Pyannote for fast, multi-speaker transcription with advanced audio preprocessing, noise reduction, and channel separation.

Ran a 0.9B transcribe + diarize model on a 17.5 minute, 4 person AMI meeting on a MacBook: all 4 speakers found, 0.08% speaker confusion, done in 12 minutes

Reddit r/LocalLLaMA

作者在 MacBook Pro (M5 Pro, 64GB) 上用 MPS 后端运行 0.9B 的 MOSS-Transcribe-Diarize 模型,对 AMI 测试集一段 17.5 分钟、4 人会议做单次转写+说话人分离,仅用 12 分钟(约 0.68x 实时)完成,4 位说话人全部识别,说话人混淆率仅 0.08%,DER 为 15.4%,并能正确处理重叠对话。

@FinanceYF5: OpenAI's new voice model Bidi 1 first test exposure - Bidirectional voice design: while you speak, it listens; you can interrupt mid-way to switch tasks immediately, no longer grabbing the conversation when you pause. It also supports real-time translation, and context memory is much stronger than the current Advanced Voice. It's now being pushed to a small group, ChatGPT …

X AI KOLs Following

OpenAI's new voice model Bidi 1 first test exposure, supports bidirectional voice design, real-time translation, and stronger context memory, currently being pushed to a small group on ChatGPT.