Getting Error
Getting Entry Not Found for url: https://huggingface.co/Samyak29/speaker-segmentation-fine-tuned-hindi/resolve/main/config.yaml.
when trying to run the code
Hey, sorry I wasn't able to replicate this error. Can you give me more details on the code?
Hi
@Samyak29
Great work!
Can You share your inference script for me as a reference?
Sure, I am using this segmentation with whisperx library. Although I cannot share the whole script, I can share a part of it:
!pip install git+https://github.com/Hasan-Naseer/whisperX.git@release/latest-faster-whisper-version
!pip install ctranslate2==4.4.0
import whisperx
from diarizers import SegmentationModel
Load the fine-tuned segmentation model
segmentation_model = SegmentationModel().from_pretrained('Samyak29/speaker-segmentation-fine-tuned-hindi')
Convert to a Pyannote model
fine_tuned_model = segmentation_model.to_pyannote_model()
Replace the default segmentation model of whisperX/any other library you are using with the fine-tuned one
diarize_model.model._segmentation.model = fine_tuned_model.to(device)
diarize_segments = diarize_model(audio, num_speakers=2)
result = whisperx.assign_word_speakers(diarize_segments, result)