🚀 说话人分割模型
本模型主要用于音频中的说话人分割任务,可实现语音活动检测、重叠语音检测和重新分割等功能,为音频处理和分析提供了强大的支持。
🚀 快速开始
如果你计划在生产环境中使用此开源模型,建议考虑切换到 pyannoteAI,以获得更好更快的选择。
✨ 主要特性
- 多任务支持:可进行语音活动检测、重叠语音检测和重新分割等任务。
- 可视化示例:提供了示例图片展示分割效果。
- 可复现研究:提供了论文结果复现所需的超参数。
📦 安装指南
本模型依赖于 pyannote.audio 2.1.1,具体安装说明请参考 安装指南。
💻 使用示例
基础用法
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": 0.5, "offset": 0.5,
"min_duration_on": 0.0,
"min_duration_off": 0.0
}
pipeline.instantiate(HYPER_PARAMETERS)
vad = pipeline("audio.wav")
重叠语音检测
from pyannote.audio.pipelines import OverlappedSpeechDetection
pipeline = OverlappedSpeechDetection(segmentation=model)
pipeline.instantiate(HYPER_PARAMETERS)
osd = pipeline("audio.wav")
重新分割
from pyannote.audio.pipelines import Resegmentation
pipeline = Resegmentation(segmentation=model,
diarization="baseline")
pipeline.instantiate(HYPER_PARAMETERS)
resegmented_baseline = pipeline({"audio": "audio.wav", "baseline": baseline})
原始分数
from pyannote.audio import Inference
inference = Inference(model)
segmentation = inference("audio.wav")
📚 详细文档
📄 许可证
本项目采用 MIT 许可证。
🔗 引用信息
@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},
}
@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
并配合以下超参数:
语音活动检测
数据集 |
onset |
offset |
min_duration_on |
min_duration_off |
AMI Mix-Headset |
0.684 |
0.577 |
0.181 |
0.037 |
DIHARD3 |
0.767 |
0.377 |
0.136 |
0.067 |
VoxConverse |
0.767 |
0.713 |
0.182 |
0.501 |
重叠语音检测
数据集 |
onset |
offset |
min_duration_on |
min_duration_off |
AMI Mix-Headset |
0.448 |
0.362 |
0.116 |
0.187 |
DIHARD3 |
0.430 |
0.320 |
0.091 |
0.144 |
VoxConverse |
0.587 |
0.426 |
0.337 |
0.112 |
VBx 重新分割
数据集 |
onset |
offset |
min_duration_on |
min_duration_off |
AMI Mix-Headset |
0.542 |
0.527 |
0.044 |
0.705 |
DIHARD3 |
0.592 |
0.489 |
0.163 |
0.182 |
VoxConverse |
0.537 |
0.724 |
0.410 |
0.563 |
预期输出(和 VBx 基线)也在 /reproducible_research
子目录中提供。