Automatic Speech Recognition
pyannote.audio
Spanish
pyannote
audio
voice
speech
speaker
speaker-diarization
segmentation
Instructions to use HiTZ/pyannote-segmentation-3.0-RTVE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- pyannote.audio
How to use HiTZ/pyannote-segmentation-3.0-RTVE with pyannote.audio:
from pyannote.audio import Model, Inference model = Model.from_pretrained("HiTZ/pyannote-segmentation-3.0-RTVE") inference = Inference(model) # inference on the whole file inference("file.wav") # inference on an excerpt from pyannote.core import Segment excerpt = Segment(start=2.0, end=5.0) inference.crop("file.wav", excerpt) - Notebooks
- Google Colab
- Kaggle
| import os | |
| import subprocess | |
| import dover_lap | |
| rttm_conf_dir = '' # path to the seg_CONF model output (RTTM file) | |
| rttm_fa_dir = '' # path to the seg_FA model output (RTTM file) | |
| rttm_miss_dir = '' # path to the seg_MISS model output (RTTM file) | |
| rttm_output_dir = '' # path to DOVER-Lap output (RTTM file) | |
| if not os.path.exists(rttm_output_dir): | |
| os.makedirs(rttm_output_dir) | |
| bashCommand_doverlap = "dover-lap" + " " + rttm_output_dir + " " + rttm_conf_dir + " " + rttm_fa_dir + " " + rttm_miss_dir | |
| weights = " " + "--weight-type custom --custom-weight '[0.37,0.26,0.37]'" # custom weights based on the RTVE database | |
| bashCommand = bashCommand_doverlap + weights | |
| subprocess.run(bashCommand, shell=True, capture_output=True) | |