SAVRN
Search Contact SAVRN

Open-weight model · Voice activity detection

segmentation

by Pyannote pyannote/segmentation

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

Parameters
Context
Weights17.7 MB
Licensemit
AccessAccess requested at publisher
Monthly Downloads1.7M

Model Card

By Pyannote, published under mit, revision 660b9e20307a.

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.

Read Pyannote's full model card

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

Speaker segmentation

Paper | Demo | Blog post

Usage

Relies on pyannote.audio 2.1.1: see installation instructions.

# 1. visit hf.co/pyannote/segmentation and accept user conditions
# 2. visit hf.co/settings/tokens to create an access token
# 3. instantiate pretrained model
from pyannote.audio import Model
model = Model.from_pretrained("pyannote/segmentation", 
                              use_auth_token="ACCESS_TOKEN_GOES_HERE")

Voice activity detection

from pyannote.audio.pipelines import VoiceActivityDetection
pipeline = VoiceActivityDetection(segmentation=model)
HYPER_PARAMETERS = {
  # onset/offset activation thresholds
  "onset": 0.5, "offset": 0.5,
  # 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)
pipeline.instantiate(HYPER_PARAMETERS)
osd = pipeline("audio.wav")
# `osd` is a pyannote.core.Annotation instance containing overlapped speech regions

Resegmentation

from pyannote.audio.pipelines import Resegmentation
pipeline = Resegmentation(segmentation=model, 
                          diarization="baseline")
pipeline.instantiate(HYPER_PARAMETERS)
resegmented_baseline = pipeline({"audio": "audio.wav", "baseline": baseline})
# where `baseline` should be provided as a pyannote.core.Annotation instance

Raw scores

from pyannote.audio import Inference
inference = Inference(model)
segmentation = inference("audio.wav")
# `segmentation` is a pyannote.core.SlidingWindowFeature
# instance containing raw segmentation scores like the 
# one pictured above (output)

Citation

@inproceedings{Bredin2021,
  Title = {{End-to-end speaker segmentation for overlap-aware resegmentation}},
  Author = {{Bredin}, Herv{\'e} and {Laurent}, Antoine},
  Booktitle = {Proc. Interspeech 2021},
  Address = {Brno, Czech Republic},
  Month = {August},
  Year = {2021},
@inproceedings{Bredin2020,
  Title = {{pyannote.audio: neural building blocks for speaker diarization}},
  Author = {{Bredin}, Herv{\'e} and {Yin}, Ruiqing and {Coria}, Juan Manuel and {Gelly}, Gregory and {Korshunov}, Pavel and {Lavechin}, Marvin and {Fustes}, Diego and {Titeux}, Hadrien and {Bouaziz}, Wassim and {Gill}, Marie-Philippe},
  Booktitle = {ICASSP 2020, IEEE International Conference on Acoustics, Speech, and Signal Processing},
  Address = {Barcelona, Spain},
  Month = {May},
  Year = {2020},
}

Reproducible research

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:

Voice activity detection onset offset min_duration_on min_duration_off
AMI Mix-Headset 0.684 0.577 0.181 0.037
DIHARD3 0.767 0.377 0.136 0.067
VoxConverse 0.767 0.713 0.182 0.501
Overlapped speech detection onset offset min_duration_on min_duration_off
AMI Mix-Headset 0.448 0.362 0.116 0.187
DIHARD3 0.430 0.320 0.091 0.144
VoxConverse 0.587 0.426 0.337 0.112
Resegmentation of VBx onset offset min_duration_on min_duration_off
AMI Mix-Headset 0.542 0.527 0.044 0.705
DIHARD3 0.592 0.489 0.163 0.182
VoxConverse 0.537 0.724 0.410 0.563

Expected outputs (and VBx baseline) are also provided in the /reproducible_research sub-directories.

Identity and Version

Repository
pyannote/segmentation
Publisher
Pyannote
Task
Voice activity detection
Modality
Other
Library
pyannote-audio
Parameters
Not stated by the source
Languages
Not stated by the source
Revision
660b9e20307a2b0cdb400d0f80aadc04a701fc54
First published
2022-03-02
Last updated
2024-05-10

Files and Weights

28 files, 36.8 MB in total. The weights are 1 file totalling 17.7 MB in bin.

Weights1 file · 17.7 MB
Configuration1 file · 318 B
Documentation2 files · 6.9 KB
Other23 files · 19.0 MB
Repository1 file · 690 B
Every file
FileTypeSizeSHA-256
pytorch_model.binWeights17.7 MB
config.yamlConfiguration318 B
LICENSEDocumentation1.1 KB
README.mdDocumentation5.8 KB
example.pngOther17.5 KB
reproducible_research/dihard3_custom_split/development.txtOther744 B
reproducible_research/dihard3_custom_split/train.txtOther2.3 KB
reproducible_research/expected_outputs/osd/AMI.development.rttmOther159.4 KB
reproducible_research/expected_outputs/osd/AMI.test.rttmOther137.9 KB
reproducible_research/expected_outputs/osd/DIHARD.development.rttmOther730.2 KB
reproducible_research/expected_outputs/osd/DIHARD.test.rttmOther640.8 KB
reproducible_research/expected_outputs/osd/VoxConverse.development.rttmOther83.5 KB
reproducible_research/expected_outputs/osd/VoxConverse.test.rttmOther233.6 KB
reproducible_research/expected_outputs/rsg/AMI.development.rttmOther339.1 KB
reproducible_research/expected_outputs/rsg/AMI.test.rttmOther298.6 KB
reproducible_research/expected_outputs/rsg/DIHARD.development.rttmOther2.8 MB
reproducible_research/expected_outputs/rsg/DIHARD.test.rttmOther2.7 MB
reproducible_research/expected_outputs/rsg/VoxConverse.development.rttmOther291.0 KB
reproducible_research/expected_outputs/vad/AMI.development.rttmOther155.4 KB
reproducible_research/expected_outputs/vad/AMI.test.rttmOther139.2 KB
reproducible_research/expected_outputs/vad/DIHARD.development.rttmOther2.0 MB
reproducible_research/expected_outputs/vad/DIHARD.test.rttmOther2.0 MB
reproducible_research/expected_outputs/vad/VoxConverse.development.rttmOther148.5 KB
reproducible_research/expected_outputs/vad/VoxConverse.test.rttmOther473.8 KB
reproducible_research/expected_outputs/vbx/AMI.rttmOther738.0 KB
reproducible_research/expected_outputs/vbx/DIHARD.rttmOther4.6 MB
reproducible_research/expected_outputs/vbx/VoxConverse.rttmOther307.7 KB
.gitattributesRepository690 B

License and Download

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

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

Built From

  • Described by arXiv:2104.04045

Memory Requirements

PrecisionWeights in memory
As published17.7 MB

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

Questions About segmentation

Can I use segmentation commercially?

Yes. segmentation 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-3.0

Pyannote

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…

Access requested at publisher mit pyannote-audio