🚀 說話人分割模型
本項目基於 pyannote.audio 2.1.1
實現說話人分割功能,可有效識別音頻中不同說話人的發言時段。在生產環境中使用此開源模型時,可考慮切換至 pyannoteAI 獲取更優、更快的選擇。
🚀 快速開始
本模型依賴於 pyannote.audio 2.1.1
,安裝說明請參考 安裝指南。
基礎用法
from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1",
use_auth_token="ACCESS_TOKEN_GOES_HERE")
diarization = pipeline("audio.wav")
with open("audio.rttm", "w") as rttm:
diarization.write_rttm(rttm)
高級用法
已知說話人數量
若事先知曉說話人的數量,可使用 num_speakers
選項:
diarization = pipeline("audio.wav", num_speakers=2)
指定說話人數量範圍
也可以使用 min_speakers
和 max_speakers
選項指定說話人數量的下限和/或上限:
diarization = pipeline("audio.wav", min_speakers=2, max_speakers=5)
🔧 技術細節
即時因子
使用一塊英偉達 Tesla V100 SXM2 GPU(用於神經推理部分)和一顆英特爾 Cascade Lake 6248 CPU(用於聚類部分)時,即時因子約為 2.5%。也就是說,處理一小時的對話大約需要 1.5 分鐘。
準確率
本管道在不斷增加的數據集上進行了基準測試。處理過程完全自動化:
- 無需手動進行語音活動檢測(文獻中有時會這樣做)
- 無需手動指定說話人數量(儘管可以將其提供給管道)
- 無需對內部模型進行微調,也無需針對每個數據集調整管道超參數
採用最嚴格的分割錯誤率(DER)設置(在 本文 中稱為 "Full"):
📚 詳細文檔
這份 報告 描述了 pyannote.audio
說話人分割管道 2.1
版本背後的主要原理。它還提供瞭如何將管道應用於您自己的標註數據集的方法。特別是,這些方法應用於上述基準測試時,與上述開箱即用的性能相比,始終能顯著提高性能。
📄 許可證
本項目採用 MIT 許可證。
額外信息收集提示
收集的信息將有助於更好地瞭解 pyannote.audio
的用戶群體,並幫助其維護者申請資助以進一步改進它。如果您是學術研究人員,請在自己的出版物中引用相關論文。如果您為公司工作,請考慮為 pyannote.audio
的開發做出貢獻(例如,通過無限制捐贈)。我們還提供圍繞說話人分割和機器聽覺的科學諮詢服務。
額外信息收集字段
- 公司/大學:文本
- 網站:文本
- 我計劃將此模型用於(任務、音頻數據類型等):文本
📖 引用
@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},
}