音频人工智能指南

说话人分类

说话人分类将录音分成时间段,并按说话人对每个时间段进行标记,从而回答谁在何时说话的问题,而无需知道任何人的名字。

听听这个指南AI叙述 · ~7 min

在本页阅读需 8 分钟
  1. 概述
  2. 主要要点
  3. 深入探讨
  4. 对五分钟的会议剪辑进行日记和评分
  5. 现实世界的实施
  6. 说话者分类的未来
  7. 付诸实践
  8. 资料来源与延伸阅读
  9. 不断探索
  10. 常见问题

概述

它将会议、电话和采访的原始记录转化为可读的对话,并通过分类错误率来衡量,在领先的开源管道的公共基准中,该错误率仍然在 8% 到 50% 左右。

主要要点

  1. 发言者分类标签在录音中发言时使用匿名发言者标签;为发言者命名是一项单独的识别任务。
  2. 典型的管道运行本地分割、说话人嵌入和聚类,如 2023 年 Interspeech 论文中对 pyannote.audio 的描述。
  3. 分类错误率加上漏话、误报和说话者混乱,除以总参考语音时间。
  4. pyannote 的扬声器分类-3.1 报告,在无项圈严格评分的情况下,广播新闻中的 DER 比例从 7.8% 上升到电影剪辑中的 50.0%。
  5. 2025 年的一项独立基准测试发现,漏讲是最大的错误源,而多人录音是最难的。

深入探讨

Speaker diarization is the task of working out who spoke when in an audio recording. The output is a list of time segments, each tagged with a speaker label such as SPEAKER_00 or SPEAKER_01. The labels are anonymous: diarization says that the same voice returns at 3:15 and 7:40, not that the voice belongs to a particular person. Naming speakers is a separate task, speaker identification, which compares voices with enrolled samples. Diarization is usually paired with automatic speech recognition, so a transcript of a meeting or phone call can show turns of dialogue instead of one undivided block of text.

The standard approach is a pipeline. Hervé Bredin's Interspeech 2023 paper on pyannote.audio 2.1 describes three stages that are typical of modern systems. First, a segmentation model slides a short window over the audio and decides, frame by frame, whether anyone is speaking and how many local speakers are active. This folds in voice activity detection, separating speech from silence, music and noise. Second, a speaker embedding model turns each local speaker's speech into a fixed-length vector, a list of numbers designed so that two clips of the same voice land close together and clips of different voices land far apart. Third, a clustering algorithm groups those vectors across the whole recording, so speaker 2 in minute one and speaker 1 in minute ten can be recognized as the same person. Agglomerative clustering, which starts with every segment as its own group and merges the closest pairs, is the method pyannote uses.

Overlapping speech, when two people talk at once, is the hardest part. Older pipelines assigned each moment to one speaker and simply lost the second voice. In 2019 Yusuke Fujita, Shinji Watanabe and colleagues proposed end-to-end neural diarization (EEND), a single network that outputs, for every frame, an independent yes or no for each speaker, which allows overlap. Because speaker labels have no natural order, they trained it with a permutation-free objective that scores the best matching between predicted and true speakers. On simulated mixtures it reached 12.28% diarization error rate against 28.77% for a clustering-based baseline.

pyannote's current segmentation model takes a further step. Alexis Plaquet and Hervé Bredin's 2023 paper replaced the per-speaker yes or no outputs with powerset classification, in which each class is a specific combination of active speakers. The segmentation-3.0 model card lists seven classes for each 10-second chunk: no speech, each of three speakers alone, and each of the three possible pairs. The authors report better results on 9 benchmarks, mostly on overlapping speech, and removal of the detection threshold that the older formulation depended on. The speaker-diarization-3.1 pipeline combines this model with embeddings and clustering, runs in pure PyTorch, and is released under the MIT license.

Performance is measured with diarization error rate (DER), the share of reference speaking time that is wrongly handled. According to the dscore toolkit, which follows NIST's RT-09 evaluation plan, DER is the sum of three errors: missed speech, false alarm speech where silence was labeled as speech, and speaker confusion where speech went to the wrong speaker. Before scoring, system labels are mapped to reference labels so the arbitrary names do not count against the system. Two settings change results a lot: a forgiveness collar, a short window around each boundary that is not scored, and whether overlapping speech is included. pyannote reports its numbers with no collar and with overlap scored, the strictest setup.

Those strict numbers show how much the domain matters. The speaker-diarization-3.1 model card reports DER of 7.8% on the REPERE broadcast set, 11.3% on VoxConverse, 12.2% on the AISHELL-4 meeting corpus, 18.8% on AMI headset mixes, 21.7% on DIHARD 3 and 50.0% on AVA-AVD, a set of movie clips. A September 2025 independent benchmark by Lanzendörfer and colleagues evaluated five systems on 196.6 hours of audio in five languages and found the commercial PyannoteAI model best at 11.2% DER, with the open-source DiariZen at 13.3%. It found most errors came from missed speech, followed by speaker confusion, and that recordings with many speakers were hardest.

Common failure modes follow from the pipeline. Short interjections such as yeah or right are often missed or given to the wrong person, because a fraction of a second carries little voice information. Similar voices, such as relatives, get merged. A single speaker who changes microphone, moves across a room or raises their voice can be split into two. Background music, television and crosstalk create false alarms. Errors also compound: the 2025 benchmark notes that diarization mistakes spread to downstream uses such as transcription and summaries, so a confused speaker turn can put words in the wrong mouth.

In practice, pyannote pipelines run in PyTorch and can be moved to a GPU with one call, which matters for long files. pyannote's pipelines are gated on Hugging Face, so users must accept the conditions and use an access token before downloading. Audio is downmixed to mono and resampled to 16 kHz on loading. Supplying the number of speakers when it is known, or a minimum and maximum, can reduce clustering mistakes. Because accuracy varies so much by domain, the reliable way to choose a system is to hand-label a few minutes of your own audio and measure DER with a fixed collar and overlap setting.

04工作示例

对五分钟的会议剪辑进行日记和评分

  1. 选择一段包含三四个扬声器和一些串扰的五分钟录音,并将其转换为 16 kHz 单声道 WAV。

  2. 听一遍,并在 RTTM 文件中手动标记说话者,这是纯文本格式的分类记分员读取的内容,包括重叠区域。

  3. 接受Hugging Face上的模型条件,然后在剪辑上运行pyannote的speaker-diarization-3.1管道并将其输出保存为RTTM。

  4. 使用 dscore 对照标签对输出进行评分,一次没有项圈,一次有 0.25 秒项圈,并记下遗漏的语音、误报和混乱部分。

  5. 使用提供的真实扬声器数量重新运行管道并再次评分。

  6. 聆听错误最大的片段,并将其分类为重叠、短感叹词或说话者混淆。

它显示了什么

两个或三个 DER 数字以及您自己的音频的错误类型列表。预计项圈会降低 DER 并已知说话者数量以减少混乱;如果大多数错误是重叠中的漏读,则与 2025 年基准测试的结果相符。

现实世界的实施

通过运行 pyannote 的开源扬声器分类-3.1 管道来生成标记有发言者标签的会议记录,该管道接受 16 kHz 单声道音频,无需手动计数发言者数量以及语音识别器。

使用 WhisperX 将说话者 1 和说话者 2 标签添加到 Whisper 输出,这会调用 pyannote 二值化模型并将其说话者标签附加到单词定时转录本。

使用 dscore 工具包根据手标签对二值化系统进行评分,该工具包使用 NIST 的 md-eval 评分和为 DIHARD II 挑战引入的 Jaccard 错误率来计算二值化错误率。

使用 NVIDIA 的 Sortformer 构建说话人归属的语音到文本,这是 NeMo 框架中发布的 2024 年模型,可将说话人标签输入转录模型的编码器。

使用 AMI、AISHELL-4、DIHARD 3 和 VoxConverse 等公共设备对会议、广播和野外音频系统进行比较,基准测试报告在 pyannote 的模型卡上。

说话者分类的未来

Several research directions are visible in recent primary sources. The September 2025 benchmark by Lanzendörfer and colleagues concluded that diarization remains unsolved, with missed speech the largest error source and many-speaker recordings the hardest, which keeps attention on overlap and detection rather than only clustering. Joint modeling of transcription and speakers is a second direction: NVIDIA's Sortformer, published at ICML 2025, feeds speaker labels into a speech-to-text encoder so that words and speaker turns are predicted together rather than stitched afterward. A third is evaluation itself. The gap between pyannote's 7.8% DER on broadcast news and 50.0% on movie clips shows that single benchmark numbers say little about a new domain, and scoring choices such as collars change results. Multilingual and far-field recordings, many-speaker scenes and long recordings with speakers who change acoustically over time remain difficult. Whether end-to-end models will fully replace modular pipelines is an open question, since current production tools still combine segmentation, embeddings and clustering.

付诸实践

为什么这很重要

  • 交通与覆盖范围. 它通过转录、旁白和语音界面提高了可访问性。
  • 成本与预算. 媒体团队可以用更少的预算更快地交付精美的音频。
  • 速度与规模. 面向客户的系统可以处理更大规模的语音交互。

留意

  • 如果未征得同意,语音滥用和冒充风险就会增加。
  • 由于口音、方言或嘈杂的环境,准确性可能会下降。
  • 如果没有明确的标签,合成音频可能会被误认为是真实的语音。

后续步骤

  1. 获得语音捕获、克隆和重用的明确同意。
  2. 测试不同扬声器和背景条件下的质量。
  3. 定义人员必须审查或批准输出的时间。
  4. 标记合成音频并保留来源记录以供问责。

资料来源与延伸阅读

  1. Hugging Face (pyannote)pyannote/speaker-diarization-3.1
  2. Hugging Face (pyannote)pyannote/segmentation-3.0
  3. ISCA (Interspeech 2023)pyannote.audio 2.1 扬声器分类管道:原理、基准和配方
  4. arXiv (Interspeech 2023)用于神经说话人二值化的 Powerset 多类交叉熵损失
  5. arXiv (Interspeech 2019)具有无排列目标的端到端神经说话人二值化
  6. arXiv (ICML 2025)Sortformer:语音转文本系统中排列解析说话人监督的新方法
  7. GitHubnryant/dscore:二值化评分工具
  8. arXiv对二化模型进行基准测试

不断探索

免费通讯

获取每日AI简报

每个工作日早晨提供三条经过验证的AI故事,使用简明英文撰写。永久免费,无广告。

每个工作日发送一封邮件。一键退订。我们永不出售或分享您的地址。

测试一下自己

参加演讲者分类测验

每个答案即时反馈,课程通过后可获得可验证ID的可分享证书。

开始测验

支持免费AI教育。AI Understanding是一家501(c)(3)非营利组织——无广告,无付费墙,永不收费。 捐款

常见问题

什么是说话人分类?

说话人分类将录音分成时间段,并按说话人对每个时间段进行标记,从而回答谁在何时说话的问题,而无需知道任何人的名字。它将会议、电话和采访的原始记录转化为可读的对话,并通过分类错误率来衡量,在领先的开源管道的公共基准中,该错误率仍然在 8% 到 50% 左右。

说话者分类通常用哪个问题来概括?

分类根据说话者随时间的推移划分音频,回答“谁在何时说话”,而不是转录单词本身。

什么是扬声器嵌入?

说话者嵌入是一个固定长度的向量,其中来自同一个人的剪辑靠近在一起,从而可以按身份进行聚类。

哪种指标通常用于评估二值化系统?

DER 将漏音、误报和说话者混淆合并为一个百分比,使其成为标准的二值化指标。

标准分类是否需要提前知道说话者的真实姓名?

分类对声音进行聚类并分配匿名标签;它不需要知道这些人的名字。

排列不变训练在端到端神经二值化中解决什么问题?

说话者输出索引在二值化中是任意的。排列不变训练找到预测和参考说话者流之间的匹配,因此损失不依赖于它们的索引顺序;这与表示多个活动标签的重叠不同。