Downloads · 30 days
11
5% of all-time downloads
rasel-harun/pyannote-bengali-finetuned-custom-V4-ss10
pyannote-bengali-finetuned-custom-V4-ss10 is a machine learning model from rasel-harun. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuned pyannote/segmentation-3.0 (via HuggingFace diarizers) on Bengali multi-speaker data. Tuned clustering threshold: 0.65 - also stored in tunedparams.json in this repo for programmatic loading.
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
206
Public
Parameters
1.5M
17.8 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt11.8 MB · 67%
From the Hugging Face model README
Fine-tuned pyannote/segmentation-3.0 (via HuggingFace diarizers) on Bengali
multi-speaker data. Tuned clustering threshold: 0.65 - also stored in
tuned_params.json in this repo for programmatic loading.
import json, torch
from pyannote.audio import Pipeline
from huggingface_hub import hf_hub_download
from diarizers import SegmentationModel
device = "cuda" if torch.cuda.is_available() else "cpu"
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1")
seg = SegmentationModel().from_pretrained("rasel-harun/pyannote-bengali-finetuned-custom-V4-ss10").to_pyannote_model()
pipeline._segmentation.model = seg.to(device)
pipeline.to(torch.device(device))
tp = json.load(open(hf_hub_download("rasel-harun/pyannote-bengali-finetuned-custom-V4-ss10", "tuned_params.json")))
params = pipeline.parameters(instantiated=True)
params["clustering"]["threshold"] = tp["clustering_threshold"]
params["segmentation"]["min_duration_off"] = tp["segmentation_min_duration_off"]
pipeline.instantiate(params)
diarization = pipeline("audio.wav", min_speakers=tp["min_speakers"],
max_speakers=tp["max_speakers"])