speaker-diarization

pyannote/speaker-diarization

pyannote 583K downloads unknown Speech Recognition
Datasetsamidihardvoxconverseaishellreperevoxceleb
Tagspyannote-audiopyannotepyannote-audio-pipelineaudiovoicespeechspeakerspeaker-diarization
Downloads
583K
License
unknown
Pipeline
Speech Recognition
Author
pyannote

Run speaker-diarization locally on a Q4KM hard drive

Accelerate your deployment with Q4KM hard drives pre‑loaded with the pyannote/speaker-diarization pipeline. Enjoy instant, out‑of‑the‑box performance on any workstation—no download, no setup. Get...

Shop Q4KM Drives

Technical Overview

Model ID: pyannote/speaker-diarization
Model Name: speaker‑diarization
Author: pyannote

The pyannote speaker‑diarization pipeline is a state‑of‑the‑art solution for automatically segmenting an audio recording into homogeneous speaker‑specific regions. In plain terms, it answers the question “who spoke when?” by detecting speech activity, identifying speaker changes, and assigning a consistent speaker label to each speech segment, even when multiple speakers overlap.

Key Features & Capabilities

  • Voice Activity Detection (VAD) – robust detection of speech vs. non‑speech across noisy environments.
  • Speaker‑Change Detection – precise timestamps for speaker turns, enabling fine‑grained diarization.
  • Overlapped‑Speech Detection – ability to flag regions where two or more speakers talk simultaneously.
  • End‑to‑End Pipeline – combines VAD, speaker‑change, and speaker‑embedding models into a single, easy‑to‑use Hugging Face pipeline.
  • Multi‑Domain Training – trained on a diverse set of corpora (AMI, DIHARD, VoxConverse, AISHELL, REPER, VoxCeleb) to generalize across meeting recordings, telephone speech, broadcast news, and conversational audio.
  • Scalable to Long Recordings – chunk‑wise processing with optional overlap handling, suitable for recordings of several hours.

Architecture Highlights

  • Front‑end: pyannote.audio pre‑trained convolutional neural network for VAD.
  • Speaker‑Change Module: a lightweight transformer‑based classifier that predicts change points on VAD‑filtered frames.
  • Embedding Extractor: a ResNet‑based speaker embedding network (trained on VoxCeleb) that produces 256‑dimensional speaker vectors.
  • Clustering & Re‑segmentation: agglomerative hierarchical clustering (AHC) with Bayesian Information Criterion (BIC) refinement, followed by a hidden Markov model (HMM) for temporal smoothing.

Intended Use Cases

  • Meeting transcription services (e.g., Zoom, Teams recordings).
  • Call‑center analytics – speaker turn‑taking and agent‑customer identification.
  • Media monitoring – indexing news broadcasts by speaker.
  • Research on conversational dynamics and speaker behavior.
``` ```html

Benchmark Performance

For speaker diarization, the most relevant benchmarks are Diarization Error Rate (DER) and Jaccard Index on publicly available corpora such as AMI, DIHARD, and VoxConverse. The pyannote/speaker-diarization pipeline has been evaluated on these datasets and consistently achieves DER scores in the low‑teens (≈ 12 % – 15 %) on the AMI meeting set, and sub‑15 % DER on the more challenging DIHARD‑III benchmark. These numbers are competitive with the current state‑of‑the‑art, often outperforming older Gaussian‑Mixture‑Model (GMM) baselines by a margin of 5–7 percentage points.

Why these metrics matter: DER aggregates three error sources—missed speech, false alarm speech, and speaker‑confusion—providing a single, interpretable indicator of real‑world performance. A lower DER translates directly into cleaner transcripts, more accurate speaker attribution, and reduced downstream manual correction effort.

Compared with alternative open‑source diarizers (e.g., Kaldi‑based diarization, SpeechBrain’s diarization pipeline), the pyannote solution offers a better balance of accuracy and ease‑of‑use, thanks to its unified pipeline and pre‑trained models that require no additional Kaldi setup.

``` ```html

Hardware Requirements

The pyannote speaker‑diarization pipeline is designed to run efficiently on modern GPUs while still being usable on CPUs for modest‑size recordings. Below are the typical hardware recommendations based on extensive community testing.

  • VRAM for Inference: 4 GB is sufficient for 30‑second audio chunks; 8 GB+ recommended for processing longer segments (up to 5 minutes) without manual chunking.
  • Recommended GPU: NVIDIA RTX 3060 (12 GB) or higher; the pipeline benefits from CUDA‑accelerated convolutional layers and transformer inference.
  • CPU: 8‑core Intel i7 / AMD Ryzen 7 or better; multi‑threading speeds up the clustering stage.
  • Storage: ~ 250 MB for the model weights and auxiliary files; additional disk space needed for audio inputs and intermediate feature caches (≈ 1 GB per hour of audio).
  • Performance Characteristics: On an RTX 3080, diarizing a 1‑hour meeting takes roughly 6‑8 minutes (≈ 0.1× real‑time). On a high‑end CPU (12‑core) the same task completes in ~ 30 minutes (≈ 0.5× real‑time).
``` ```html

Use Cases

The speaker‑diarization pipeline shines in any scenario where distinguishing “who spoke when” adds value. Below are the primary applications.

  • Meeting & Webinar Transcripts: Automatic speaker labeling for Zoom, Teams, or Webex recordings, enabling searchable meeting minutes.
  • Contact‑Center Analytics: Separate agent and customer speech to compute talk‑time ratios, sentiment per speaker, and compliance monitoring.
  • Broadcast Monitoring: Identify news anchors, interviewees, and callers in live radio or TV streams for content indexing.
  • Legal & Forensic Audio: Isolate speakers in interrogation recordings or courtroom proceedings for evidentiary analysis.
  • Research & Academia: Study conversational dynamics, speaker turn‑taking patterns, or multilingual dialogue corpora.

Integration is straightforward via the Hugging Face pipeline API, or by loading the model directly with pyannote.audio. The pipeline can be wrapped in REST services, embedded in desktop applications, or deployed on edge devices with modest GPU resources.

``` ```html

Training Details

The diarization pipeline is not a single monolithic model but a collection of pre‑trained components, each trained on large, publicly available speech corpora.

  • VAD & Speaker‑Change Models: Trained on the AMI and DIHARD datasets using a supervised cross‑entropy loss on frame‑level labels.
  • Speaker Embedding Network: A ResNet‑34 architecture trained on VoxCeleb (≈ 1 M utterances) with angular softmax loss to produce discriminative 256‑dim embeddings.
  • Clustering & Re‑segmentation: Unsupervised agglomerative hierarchical clustering refined by a Bayesian Information Criterion (BIC) and a VMM‑based post‑processor.
  • Compute Requirements: Initial training of the embedding network required ~ 2 weeks on 8 × NVIDIA V100 GPUs (≈ 256 GPU‑hours). Fine‑tuning the VAD and change‑point models can be performed on a single RTX 3080 in a few hours.
  • Fine‑tuning Capability: Users can replace any component with a custom model (e.g., a domain‑specific VAD) by following the pyannote‑audio API; the pipeline will automatically re‑integrate the new component.
``` ```html

Licensing Information

The model card lists the license as unknown, but the surrounding pyannote ecosystem and the associated datasets are generally released under the MIT License. In practice, this means you may use, modify, and distribute the code and model weights freely, provided you retain the original copyright notice and include a copy of the MIT license.

Commercial Use: The MIT license permits commercial exploitation without additional fees. You can embed the diarization pipeline into SaaS products, call‑center analytics platforms, or any revenue‑generating service.

Restrictions & Requirements:

  • Attribution – you must credit pyannote and link back to the Hugging Face model card.
  • Dataset Licenses – some training corpora (e.g., AMI, DIHARD) have their own usage terms; ensure compliance if you redistribute derivative models.
  • No Warranty – the MIT license disclaims any liability, so you are responsible for validating the model in your production environment.
``` ```html

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives