skillfed

pyannote-audio

State-of-the-art speaker diarization toolkit

pyannote-audio v4.0.7 2.3M downloads/30d#3,152 on PyPI
License unclear Active released

What it is and what it does

pyannote.audio is a speaker diarization toolkit built on PyTorch that answers the question 'who spoke when' in audio files. It provides pretrained pipelines ready to use out of the box: a free community-1 open-source model that runs locally, and a premium precision-2 model that runs on pyannoteAI servers. Both pipelines take an audio file and output time-segmented speaker labels, identifying speaker boundaries and assigning consistent speaker IDs across the file.

The package is designed for developers and researchers who need to process audio programmatically. It handles audio decoding via torchcodec (requiring ffmpeg), manages model downloads from huggingface-hub, and supports GPU acceleration. The toolkit includes optional telemetry that tracks pipeline usage and file durations in a privacy-preserving way, configurable via environment variable or Python API. It is actively maintained and widely used.

Use it for:

  • Transcription preprocessing: identify speaker boundaries before passing segments to speech-to-text
  • Meeting analysis: determine who spoke when in recorded meetings or conference calls
  • Podcast or interview processing: separate and label different speakers for editing or analysis
  • Audio quality assurance: detect speaker overlap or anomalies in multi-speaker recordings
  • Voice biometrics: extract speaker segments for voiceprinting or speaker verification tasks

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Speaker diarization toolkit that identifies and separates individual speakers in audio files using PyTorch-based pretrained models, with options for local open-source or cloud-hosted premium pipelines.

Yes, if you need speaker diarization. The package is actively maintained, has no known vulnerabilities, and offers both free and premium options. Install friction is low (pure wheel, standard ML dependencies). The main gotcha is the ffmpeg system dependency and the 21-package dependency tree—typical for PyTorch-based audio ML but not lightweight. Requires Python >=3.10. Suitable for production use with either the open-source community-1 model or the cloud-hosted precision-2 service.

Install

pyannote-audio on PyPI

pip

pip install pyannote-audio

uv

uv add pyannote-audio

poetry

poetry add pyannote-audio

Installing pyannote-audio

Before you install

Low install friction with a pure-Python wheel. Active maintenance (45 days since last release). Requires ffmpeg as a system dependency for audio decoding, and 21 runtime dependencies including torch, torchaudio, and lightning—a substantial but standard ML stack.

Quickstart

pip install pyannote-audio

import torch
from pyannote.audio import Pipeline

pipeline = Pipeline.from_pretrained(
    "pyannote/speaker-diarization-community-1",
    token="HUGGINGFACE_ACCESS_TOKEN")
pipeline.to(torch.device("cuda"))
output = pipeline("audio.wav")

for turn, speaker in output.speaker_diarization:
    print(f"start={turn.start:.1f}s stop={turn.end:.1f}s speaker_{speaker}")

ffmpeg must be installed on your system; requires Python >=3.10; Hugging Face access token needed for community-1 model

Verify before relying

  • Whether the community-1 model requires accepting terms on Hugging Face before first use
  • GPU memory requirements for different audio file durations
  • Whether telemetry can be fully disabled without environment variable configuration

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 21 — asteroid-filterbanks, einops, huggingface-hub, lightning, matplotlib, opentelemetry-api, opentelemetry-exporter-otlp, opentelemetry-sdk, pyannote-core, pyannote-database, pyannote-metrics, pyannote-pipeline, pyannoteai-sdk, pytorch-metric-learning, rich, safetensors, torch-audiomentations, torch, torchaudio, torchcodec, torchmetrics
Maintenance actively maintained — 45 days since the last release
First released
Downloads 2,306,394/month — #3,152 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyannote_audio-4.0.7-py3-none-any.whl

Tags

speaker diarizationwho spoke when audiospeaker segmentationspeaker identification audiovoice activity detectionspeaker separationaudio speaker tracking
audio-processingspeaker-diarizationpytorch-ml

More Artificial Intelligence packages