Speaker diarization is the process of partitioning an audio recording by speaker identity: figuring out who spoke when, and attaching a label to every stretch of speech. It answers "who spoke when" without needing to know anyone's name. The output turns a flat wall of transcript text into a readable conversation.
Speaker diarization in AssemblyAI: set speaker_labels: true on a transcription request. The API returns a list of utterances, each tagged with a speaker label (A, B, C) and start and end timestamps. AssemblyAI-STT-3.7, the flagship model for recorded audio, runs on a new speaker diarization model. Compared with Universal-3.5 Pro at its launch, it cuts cpWER by 20%, diarization error rate by 36% and speaker-count errors by 63%, and it runs 3–4× faster, according to the AssemblyAI-STT-3.7 research post.
This guide covers how diarization works step by step, how it's measured, how it differs on recordings and live streams, and how to add it to your product in a few lines of code.
How does speaker diarization work? The short answer
Most diarization systems follow four steps:
- Detect speech. Find the parts of the audio that contain a human voice.
- Segment. Cut that speech into chunks where only one person is talking.
- Embed. Turn each chunk into a vector, a numerical voiceprint.
- Cluster. Group similar voiceprints so each speaker gets one consistent label.
The last mile is attaching those labels to words. Many systems give every word in a stretch of audio the label of that stretch, even where the model wasn't sure. AssemblyAI's new diarization model takes the model's confidence into account when it assigns each word to a speaker, so sentences stay intact and quick interjections like "yeah" and "mm-hmm" still go to the right person.
Why speaker diarization matters
Transcription tells you what was said. Diarization tells you who said it. Without attribution, most downstream analysis breaks.
- Contact centers need to separate agent from customer to score compliance, talk ratio and sentiment per side.
- AI notetakers need to assign action items to the right person.
- Clinical documentation needs to know whether a symptom came from the patient or the clinician.
- Sales coaching measures who dominated the call and how often the rep interrupted.
Errors here cost more than they appear to. A single swapped label can flip who agreed to a price, or who reported a side effect. Product teams treat diarization accuracy as a requirement for that reason.
Sign up free and add speaker labels to your first AssemblyAI-STT-3.7 transcript with one parameter. Diarization on recorded audio is a $0.02/hr add-on.
The four steps in detail
1. Voice activity detection
Voice activity detection (VAD) strips out silence, music, hold tones and background noise. Everything downstream works only on speech. Weak VAD lets noise leak into the speaker clusters, where it can show up as a phantom extra speaker.
2. Segmentation
Segmentation finds speaker-change points and cuts the speech into chunks that each hold one voice. Short turns are the hard part. A "yeah" or "mm-hmm" may be too brief to attribute with confidence, so systems handle back-channels carefully.
3. Embedding
Each segment is converted into a speaker embedding: a vector that captures pitch, timbre and speaking style while ignoring the words themselves. Two segments from the same person should land close together in that vector space.
4. Clustering
Clustering groups the embeddings and decides how many speakers there are. Estimating the speaker count is one of the hardest problems in diarization. Too few clusters merges two people into one label. Too many splits one person across several. That's why APIs let you pass an expected count or range when you know it.
Three architectural approaches
| Approach | How it works | Trade-off |
|---|---|---|
| Modular pipeline | Separate VAD, segmentation, embedding and clustering models | Easy to debug and swap parts, but errors compound from stage to stage |
| End-to-end neural | One network maps audio frames directly to speaker activity | Handles overlapping speech better, but needs more training data |
| Hybrid | Combines learned components and ties speaker labels to the transcript's words | The common production choice; balances accuracy and stability on messy audio |
How diarization is measured: DER vs cpWER
Diarization error rate (DER) scores time: the share of audio seconds assigned to the wrong speaker, missed or falsely detected. Concatenated minimum-permutation word error rate (cpWER) scores words: it measures whether each word in the transcript is both correct and attributed to the right speaker.
DER can rank systems backwards. A transcript can look broken to a reader and still post a good DER, and the reverse happens too. Our research team walks through real examples in DER vs. cpWER. If you want to score your own files, measure diarization accuracy with cpWER in Python shows how. A third number is worth tracking: the speaker-count difference, the predicted number of speakers minus the true number, averaged over files.
What changed with AssemblyAI-STT-3.7
AssemblyAI-STT-3.7 shipped on November 18, 2026 with a new speaker diarization model. It replaces Universal-3.5 Pro, which is now deprecated. The new diarization model is live across all of AssemblyAI's async speech models, so if you already set speaker_labels: true, you get it with no code change.
Across seven English speaker-annotated conversation datasets, against Universal-3.5 Pro with the previous diarization model:
| Metric (full recordings) | Universal-3.5 Pro + previous diarization | AssemblyAI-STT-3.7 + new diarization |
|---|---|---|
| cpWER | 29.3% | 23.5% |
| DER | 14.7% | 9.4% |
| Average speaker-count difference | 0.57 | 0.21 |
Source: the AssemblyAI-STT-3.7 research post, November 2026. Lower is better on all three.
The biggest gains are on short clips, where the model has the least audio to learn each voice from. On 60-second clips, cpWER fell from 34.0% to 18.6%, so speaker labels hold up on voice notes and short call snippets. The gains carry beyond English: on conversational recordings in nine other languages, cpWER is lower with AssemblyAI-STT-3.7 than with Universal-3.5 Pro in every one, from 23.5% to 22.1% on average.
How AssemblyAI-STT-3.7 compares with other APIs
On speaker-attributed transcription of English conversations (average cpWER over AMI, CallHome, DiPCo and NOTSOFAR), AssemblyAI-STT-3.7 is ahead of ElevenLabs, AWS Transcribe, Speechmatics, Deepgram, Gladia and Soniox:
| Pre-recorded API | Average cpWER (lower is better) |
|---|---|
| AssemblyAI-STT-3.7 | 24.2% |
| ElevenLabs Scribe v2 | 26.4% |
| AWS Transcribe | 32.0% |
| Speechmatics Enhanced | 33.7% |
| Deepgram Nova-3 | 34.8% |
| Gladia Solaria-1 | 36.5% |
| Soniox stt-async-v5 | 43.8% |
Selected providers from the benchmarks page, each vendor's production pre-recorded API at default settings. AssemblyAI-STT-3.7 measured November 2026; other providers October 2026.
On diarization error rate, averaged over six English conversation datasets, AssemblyAI-STT-3.7 has the lowest DER of the pre-recorded APIs measured: 10.7%, ahead of ElevenLabs Scribe v3 at 12.0%, Speechmatics Enhanced at 16.2% and Deepgram Nova-3 at 17.4%. Benchmarks on public datasets are a starting point, so always test on recordings like yours.
Diarization on recordings vs. live streams
Pre-recorded diarization sees the whole file before it labels anyone. It can compare every voice against every other voice, which makes it the more accurate setting.
Streaming diarization has to label each turn as it arrives. With AssemblyAI-STT-3.7-Realtime, every Turn event carries a speaker_label, and every final word carries a speaker field, so you can catch a speaker change mid-turn. From the start of a session, speaker labels are final the moment a turn ends. There's no revision pass and no SpeakerRevision message to wait for, so whatever your app renders stays put.
Live accuracy depends on the audio. In the launch measurements, AssemblyAI-STT-3.7-Realtime posted a live DER of 10.46% on CallHome (40 unscripted telephone calls) and 6.3% on NOTSOFAR (129 real meetings on a single distant microphone, up to seven speakers). On both sets that's the lowest live diarization error rate of every realtime provider measured, ahead of ElevenLabs Scribe v3 Live and Meta Muse Voice Transcribe.
A few limits apply to live labels, per the docs:
- Turns with less than about one second of audio come back labeled
PENDING, because there isn't enough audio for a reliable voiceprint. - When two people talk at once, the turn goes to one speaker.
- The first one or two turns of a session can be misassigned while the model builds speaker profiles.
For the full real-time picture, read streaming speaker diarization: how to identify who's speaking in real time.
How to add speaker diarization with AssemblyAI
The examples use the AssemblyAI Python SDK (pip install assemblyai). The full scripts are in the companion repo.
Pre-recorded audio
import os
from assemblyai import SpeakerOptions
from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig
config = TranscriptionConfig(
speech_models=["assemblyai-stt-3-7"],
speaker_labels=True,
# Optional: a range when you know roughly how many people speak.
speaker_options=SpeakerOptions(min_speakers_expected=2, max_speakers_expected=4),
)
transcriber = Transcriber(api_key=os.environ["ASSEMBLYAI_API_KEY"], config=config)
transcript = transcriber.transcribe("./call.mp3") # local path or public URL
if transcript.status == "error":
raise RuntimeError(f"Transcription failed: {transcript.error}")
for utterance in transcript.utterances:
print(f"Speaker {utterance.speaker}: {utterance.text}")Output looks like this (illustrative):
Speaker A: Thanks for calling, how can I help?
Speaker B: Hi, I'm calling about my last invoice.Both speaker-count settings are hard boundaries, not hints. max_speakers_expected is a strict cap: extra voices are merged into existing labels, so leave a little headroom. Use speakers_expected only when you know the exact count. The speaker diarization docs list every option, including per-word speaker_confidence.
Live streams
Add speaker_labels=True to your connection parameters on AssemblyAI-STT-3.7-Realtime, the model the docs recommend for diarization:
import os
import time
from assemblyai.streaming.v3 import (
RealTimeEvents,
RealTimeParameters,
RealTimeTranscriber,
RealTimeTranscriberOptions,
TurnEvent,
)
def on_turn(client: RealTimeTranscriber, event: TurnEvent):
if event.end_of_turn:
print(f"Speaker {event.speaker_label}: {event.transcript}")
client = RealTimeTranscriber(
RealTimeTranscriberOptions(terminate_timeout=30.0),
api_key=os.environ["ASSEMBLYAI_API_KEY"],
)
client.on(RealTimeEvents.Turn, on_turn)
client.connect(
RealTimeParameters(
sample_rate=16000,
speech_model="assemblyai-stt-3-7-realtime",
speaker_labels=True,
)
)
with open("meeting.pcm", "rb") as f: # 16 kHz, 16-bit mono PCM
while chunk := f.read(3200): # 100 ms chunks, sent at live speed
client.stream(chunk)
time.sleep(0.1)
client.disconnect(terminate=True)You can cap the speaker count with max_speakers. Details are in the streaming diarization docs.
From "Speaker A" to real names
Diarization gives you anonymous labels. Speaker Identification maps them to names or roles, such as "Agent" and "Customer", using the conversation's content. No voice enrollment is required.
| What you get from AssemblyAI | Models | Add-on price |
|---|---|---|
| Pre-recorded speaker diarization | AssemblyAI-STT-3.7 ($0.21/hr), Universal-2 ($0.15/hr) | +$0.02/hr |
| Streaming diarization, labels final at turn end | AssemblyAI-STT-3.7-Realtime ($0.30/hr), AssemblyAI-STT-3.7-Realtime-Agent ($0.45/hr) | +$0.12/hr |
| Speaker Identification (names or roles) | Speech Understanding, on top of a diarized transcript | +$0.02/hr (low effort, default) or +$0.10/hr (medium effort) |
Full details are on the pricing page.
Upload a two-speaker recording to the playground and check the utterances, labels and timestamps AssemblyAI-STT-3.7 returns on your own audio.
Where speaker diarization gets used
- Meetings and AI notetakers: attributed summaries and action items. See AI notetakers.
- Contact centers: agent vs. customer analytics, QA and compliance. Read our conversation intelligence guide.
- Sales and recruiting: talk ratios, objection handling and interview notes.
- Healthcare: separating clinician from patient in ambient documentation.
- Media: searchable speaker timelines for podcasts, interviews and broadcasts.
- Multilingual teams: diarization runs in every supported language. See multilingual transcription for how speaker labels and code switching work together.
Build it yourself or call an API?
Open-source toolkits like pyannote.audio and NVIDIA NeMo give you full control over the pipeline. They also give you the job of maintaining it: model updates, GPU capacity, speaker-count tuning, and pairing the diarization output with a separate ASR model's timestamps.
An API returns transcript and speaker labels in one response, tuned and benchmarked for you. If you want to compare options side by side, see our roundup of the top speaker diarization libraries and APIs. The Speech-to-Text API page covers what else ships with the model.
Where diarization is heading
Diarization is moving from a batch post-processing step to live infrastructure. Notetakers want labels during the meeting, and voice agents need to know which voice to answer. The 3.7 release points the same way: short clips, which used to be the weakest case, saw the largest gains, and live labels no longer get rewritten after the fact. The remaining hard problems are overlapping speech and very short turns, which we cover in the hard cases in speaker diarization.
Diarization also sits next to related tasks that people often confuse with it. Recognition and verification match voices to known identities; diarization never needs to. The diarization vs. recognition vs. identification breakdown explains the difference. For the history of AssemblyAI's speaker embedding work, see the 2025 speaker diarization update.
Try the API for free and get speaker-labeled transcripts from AssemblyAI-STT-3.7 in 32 languages, with the new diarization model on by default when you set speaker_labels.
Frequently Asked Questions (FAQs)
What does "enable speaker diarization" mean?
It means turning on the setting that adds speaker labels to a transcript. In AssemblyAI's API, you set speaker_labels: true. The response then returns utterances tagged Speaker A, Speaker B and so on, each with start and end timestamps.
How does speaker diarization work?
A diarization system detects speech, cuts it into single-speaker segments, turns each segment into a voiceprint vector, and clusters similar vectors so each speaker gets one label. The labels are then attached to the transcript's words. AssemblyAI's current diarization model weighs its confidence when it assigns each word, which keeps short interjections with the right speaker.
How accurate is speaker diarization today?
On English conversation benchmarks, AssemblyAI-STT-3.7 averages 24.2% cpWER, ahead of AWS Transcribe at 32.0%, Speechmatics Enhanced at 33.7% and Deepgram Nova-3 at 34.8%. Against Universal-3.5 Pro at launch, it cuts DER by 36% and speaker-count errors by 63%. Always test on recordings like yours.
Does Whisper support speaker diarization?
Open-source Whisper models don't output speaker labels. Teams usually pair Whisper with a separate diarization toolkit such as pyannote, then align the two outputs by timestamp. APIs like AssemblyAI return the transcript and speaker labels together.
What is the difference between speaker diarization and speaker recognition?
Diarization groups voices into anonymous labels without knowing who anyone is. Recognition matches a voice to a known, enrolled identity. AssemblyAI's Speaker Identification is a third option: it maps diarized labels to names or roles from the conversation's content, with no enrollment.
Can speaker diarization work in real time?
Yes. AssemblyAI-STT-3.7-Realtime labels each turn live, and the label is final when the turn ends, with no revision pass. Turns shorter than about a second come back as PENDING. Streaming diarization is a $0.12/hr add-on on both 3.7 realtime models.