Models
Collection
A collection of multilingual speaker segmentation model's fine-tuned using diarizers and compatible with pyannote.
•
5 items
•
Updated
This model is a fine-tuned version of pyannote/segmentation-3.0 on the diarizers-community/callhome eng dataset. It achieves the following results on the evaluation set:
This segmentation model has been trained on English data (Callhome) using diarizers. It can be loaded with two lines of code:
from diarizers import SegmentationModel
segmentation_model = SegmentationModel().from_pretrained('diarizers-community/speaker-segmentation-fine-tuned-callhome-eng')
To use it within a pyannote speaker diarization pipeline, load the pyannote/speaker-diarization-3.1 pipeline, and convert the model to a pyannote compatible format:
from pyannote.audio import Pipeline
import torch
device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
# load the pre-trained pyannote pipeline
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
pipeline.to(device)
# replace the segmentation model with your fine-tuned one
model = segmentation_model.to_pyannote_model()
pipeline._segmentation.model = model.to(device)
You can now use the pipeline on audio examples:
# load dataset example
dataset = load_dataset("diarizers-community/callhome", "jpn", split="data")
sample = dataset[0]["audio"]
# pre-process inputs
sample["waveform"] = torch.from_numpy(sample.pop("array")[None, :]).to(device, dtype=model.dtype)
sample["sample_rate"] = sample.pop("sampling_rate")
# perform inference
diarization = pipeline(sample)
# dump the diarization output to disk using RTTM format
with open("audio.rttm", "w") as rttm:
diarization.write_rttm(rttm)
More information needed
More information needed
The following hyperparameters were used during training:
Training Loss | Epoch | Step | Validation Loss | Der | False Alarm | Missed Detection | Confusion |
---|---|---|---|---|---|---|---|
0.4123 | 1.0 | 362 | 0.4801 | 0.1930 | 0.0627 | 0.0741 | 0.0563 |
0.3906 | 2.0 | 724 | 0.4558 | 0.1836 | 0.0589 | 0.0727 | 0.0519 |
0.3753 | 3.0 | 1086 | 0.4643 | 0.1830 | 0.0557 | 0.0746 | 0.0527 |
0.3632 | 4.0 | 1448 | 0.4566 | 0.1821 | 0.0564 | 0.0728 | 0.0529 |
0.3475 | 5.0 | 1810 | 0.4602 | 0.1828 | 0.0584 | 0.0717 | 0.0528 |
Base model
pyannote/segmentation-3.0