HuggingFace镜像/segmentation
模型介绍文件和版本分析
下载使用量0

在生产环境中使用此开源模型?
考虑切换到pyannoteAI以获得更好和更快的选项。

🎹 说话人分割

论文 | 演示 | 博客文章

示例

使用方法

依赖于pyannote.audio 2.1.1:请参阅安装说明。

# 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")

语音活动检测

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

重叠语音检测

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

重新分段

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

原始分数

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)

引用

在学术和专业写作中,引用是指恰当指明他人思想、数据或文字作品的来源的做法。这不仅是对原作者知识产权的尊重,也是确保研究诚信和透明度的关键环节。通过遵循特定的引用格式(如APA、MLA、Chicago等),作家能够清晰地向读者展示其论点的支持依据,同时也使其他研究者能追溯到原始资料进行进一步的研究。正确的引用实践促进了知识的有序积累和传播,避免了抄袭的问题,确保学术交流的纯洁性和严肃性。

@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},

当然,我会遵循您的要求,提供高质量的翻译服务。请提供您希望翻译的英文文本,我将会以通俗、专业、优雅且流畅的中文风格进行翻译,并确保保留其原有的Markdown格式。请直接输入文本内容即可。

@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},
}

可重复研究

为了重现论文 "End-to-end speaker segmentation for overlap-aware resegmentation" 的结果,请使用 pyannote/segmentation@Interspeech2021 并设置以下超参数:

语音活动检测onsetoffsetmin_duration_onmin_duration_off
AMI Mix-Headset0.6840.5770.1810.037
DIHARD30.7670.3770.1360.067
VoxConverse0.7670.7130.1820.501
重叠语音检测onsetoffsetmin_duration_onmin_duration_off
AMI Mix-Headset0.4480.3620.1160.187
DIHARD30.4300.3200.0910.144
VoxConverse0.5870.4260.3370.112
VBx 重分割onsetoffsetmin_duration_onmin_duration_off
AMI Mix-Headset0.5420.5270.0440.705
DIHARD30.5920.4890.1630.182
VoxConverse0.5370.7240.4100.563

预期的输出(以及 VBx 基线)也提供在 /reproducible_research 子目录中。