SAVRN
Search Contact SAVRN

Open-weight model · Voice activity detection

segmentation-3.0

by Pyannote pyannote/segmentation-3.0

Using this open-source model in production? Consider switching to pyannoteAI for better and faster options.

Parameters
Context
Weights5.9 MB
Licensemit
AccessAccess requested at publisher
Monthly Downloads5.8M

Model Card

By Pyannote, published under mit, revision e66f3d3b9eb0.

Using this open-source model in production? Consider switching to pyannoteAI for better and faster options. This model ingests 10 seconds of mono audio sampled at 16kHz and outputs speaker diarization as a (numframes, numclasses) matrix where the 7 classes are non-speech, speaker #1, speaker #2, speaker #3, speakers #1 and #2, speakers #1 and #3, and speakers #2 and #3. The various concepts behind this model are described in details in this paper. It has been trained by Séverin Baroudi with pyannote.audio 3.0.0 using the combination of the training sets of AISHELL, AliMeeting, AMI, AVA-AVD, DIHARD, Ego4D, MSDWild, REPERE, and VoxConverse. This companion repository by Alexis Plaquet also…

Read Pyannote's full model card

Using this open-source model in production?
Consider switching to pyannoteAI for better and faster options.

"Powerset" speaker segmentation

This model ingests 10 seconds of mono audio sampled at 16kHz and outputs speaker diarization as a (num_frames, num_classes) matrix where the 7 classes are non-speech, speaker #1, speaker #2, speaker #3, speakers #1 and #2, speakers #1 and #3, and speakers #2 and #3.

# waveform (first row)
duration, sample_rate, num_channels = 10, 16000, 1
waveform = torch.randn(batch_size, num_channels, duration * sample_rate) 

# powerset multi-class encoding (second row)
powerset_encoding = model(waveform)

# multi-label encoding (third row)
from pyannote.audio.utils.powerset import Powerset
max_speakers_per_chunk, max_speakers_per_frame = 3, 2
to_multilabel = Powerset(
    max_speakers_per_chunk, 
    max_speakers_per_frame).to_multilabel
multilabel_encoding = to_multilabel(powerset_encoding)

The various concepts behind this model are described in details in this paper.

It has been trained by Séverin Baroudi with pyannote.audio 3.0.0 using the combination of the training sets of AISHELL, AliMeeting, AMI, AVA-AVD, DIHARD, Ego4D, MSDWild, REPERE, and VoxConverse.

This companion repository by Alexis Plaquet also provides instructions on how to train or finetune such a model on your own data.

Requirements

  1. Install pyannote.audio 3.0 with pip install pyannote.audio
  2. Accept pyannote/segmentation-3.0 user conditions
  3. Create access token at hf.co/settings/tokens.

Usage

# instantiate the model
from pyannote.audio import Model
model = Model.from_pretrained(
  "pyannote/segmentation-3.0", 
  use_auth_token="HUGGINGFACE_ACCESS_TOKEN_GOES_HERE")

Speaker diarization

This model cannot be used to perform speaker diarization of full recordings on its own (it only processes 10s chunks).

See pyannote/speaker-diarization-3.0 pipeline that uses an additional speaker embedding model to perform full recording speaker diarization.

Voice activity detection

from pyannote.audio.pipelines import VoiceActivityDetection
pipeline = VoiceActivityDetection(segmentation=model)
HYPER_PARAMETERS = {
  # remove speech regions shorter than that many seconds.
  "min_duration_on": 0.0,
  # fill non-speech regions shorter than that many seconds.
  "min_duration_off": 0.0
}
pipeline.instantiate(HYPER_PARAMETERS)
vad = pipeline("audio.wav")
# `vad` is a pyannote.core.Annotation instance containing speech regions

Overlapped speech detection

from pyannote.audio.pipelines import OverlappedSpeechDetection
pipeline = OverlappedSpeechDetection(segmentation=model)
HYPER_PARAMETERS = {
  # remove overlapped speech regions shorter than that many seconds.
  "min_duration_on": 0.0,
  # fill non-overlapped speech regions shorter than that many seconds.
  "min_duration_off": 0.0
}
pipeline.instantiate(HYPER_PARAMETERS)
osd = pipeline("audio.wav")
# `osd` is a pyannote.core.Annotation instance containing overlapped speech regions

Citations

@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},
}
@inproceedings{Bredin23,
  author={Hervé Bredin},
  title={{pyannote.audio 2.1 speaker diarization pipeline: principle, benchmark, and recipe}},
  year=2023,
  booktitle={Proc. INTERSPEECH 2023},
}

Identity and Version

Repository
pyannote/segmentation-3.0
Publisher
Pyannote
Task
Voice activity detection
Modality
Other
Library
pyannote-audio
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
e66f3d3b9eb0873085418a7b813d3b369bf160bb
First published
2023-09-22
Last updated
2024-05-10

Files and Weights

6 files, 6.0 MB in total. The weights are 1 file totalling 5.9 MB in bin.

Weights1 file · 5.9 MB
Configuration1 file · 399 B
Documentation2 files · 5.7 KB
Other1 file · 69.3 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights5.9 MB
config.yamlConfiguration399 B
LICENSEDocumentation1.1 KB
README.mdDocumentation4.6 KB
example.pngOther69.3 KB
.gitattributesRepository1.5 KB

License and Download

License
mit
Access
Access requested at publisher
Download size
5.9 MB
Request access from Pyannote

Pyannote grants access through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published5.9 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About segmentation-3.0

Can I use segmentation-3.0 commercially?

Yes. segmentation-3.0 is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Voice activity detection

segmentation

Pyannote

Using this open-source model in production? Consider switching to pyannoteAI for better and faster options. In order to reproduce the results of the paper "End-to-end speaker segmentation for overlap-aware resegmentation ", use pyannote/segmentation@Interspeech2021 with the following hyper-parameters: Expected outputs (and VBx baseline) are also provided in the /reproducibleresearch sub-directories.

Access requested at publisher mit pyannote-audio