pyannote 音频
Version 3.3.1
在生产中使用pyannote.audio
开源工具包?考虑切换到 pyannoteAI 以获得更好更快的选择。
pyannote.audio
扬声器二值化工具包pyannote.audio
是一个用 Python 编写的开源工具包,用于说话人分类。它基于 PyTorch 机器学习框架,配备了最先进的预训练模型和管道,可以根据您自己的数据进一步微调,以获得更好的性能。
pip install pyannote.audio
pyannote.audio
安装 pyannote.audiopyannote/segmentation-3.0
用户条件pyannote/speaker-diarization-3.1
用户条件hf.co/settings/tokens
创建访问令牌。 from pyannote . audio import Pipeline
pipeline = Pipeline . from_pretrained (
"pyannote/speaker-diarization-3.1" ,
use_auth_token = "HUGGINGFACE_ACCESS_TOKEN_GOES_HERE" )
# send pipeline to GPU (when available)
import torch
pipeline . to ( torch . device ( "cuda" ))
# apply pretrained pipeline
diarization = pipeline ( "audio.wav" )
# print the result
for turn , _ , speaker in diarization . itertracks ( yield_label = True ):
print ( f"start= { turn . start :.1f } s stop= { turn . end :.1f } s speaker_ { speaker } " )
# start=0.2s stop=1.5s speaker_0
# start=1.8s stop=3.9s speaker_1
# start=4.2s stop=5.7s speaker_0
# ...
pyannote
预训练语音分离管道,作者:Clément Pagés 开箱即用的pyannote.audio
扬声器二值化管道 v3.1 预计比 v2.x 更好(更快)。这些数字是二值化错误率(以%为单位):
基准 | v2.1 | v3.1 | pyannoteAI |
---|---|---|---|
AISHELL-4 | 14.1 | 12.2 | 11.9 |
阿里会议(频道1) | 27.4 | 24.4 | 22.5 |
AMI (IHM) | 18.9 | 18.8 | 16.6 |
AMI(SDM) | 27.1 | 22.4 | 20.9 |
AVA-AVD | 66.3 | 50.0 | 39.8 |
打电话回家(第 2 部分) | 31.6 | 28.4 | 22.2 |
迪哈德 3(完整) | 26.9 | 21.7 | 17.2 |
盈利21 | 17.0 | 9.4 | 9.0 |
Ego4D(开发) | 61.5 | 51.2 | 43.8 |
默沙东狂野 | 32.8 | 25.3 | 19.8 |
随机存取存储器控制器 | 22.5 | 22.2 | 18.4 |
重复(第二阶段) | 8.2 | 7.8 | 7.6 |
VoxConverse (v0.3) | 11.2 | 11.3 | 9.4 |
二值化错误率(%)
如果您使用pyannote.audio
请使用以下引用:
@inproceedings { Plaquet23 ,
author = { Alexis Plaquet and Hervé Bredin } ,
title = { {Powerset multi-class cross entropy loss for neural speaker diarization} } ,
year = 2023 ,
booktitle = { Proc. INTERSPEECH 2023 } ,
}
@inproceedings { Bredin23 ,
author = { Hervé Bredin } ,
title = { {pyannote.audio 2.1 speaker diarization pipeline: principle, benchmark, and recipe} } ,
year = 2023 ,
booktitle = { Proc. INTERSPEECH 2023 } ,
}
下面的命令将设置开发pyannote.audio
库所需的预提交挂钩和包。
pip install -e .[dev,testing]
pre-commit install
pytest