Speaker Diarization Explained: How to Identify Who Said What
A meeting transcript without speaker labels tells you what was said and nothing about who said it. Speaker diarization adds the who. This guide covers what it is, how it differs from transcription and voice recognition, and how to get speaker labels from your own recordings.
What is speaker diarization?
Speaker diarization is the process of partitioning an audio recording by who is speaking. The word comes from "diary", in the sense of keeping a record of who did what and when. Diarization takes one audio stream with several people on it, cuts it into segments and labels each segment with a speaker: Speaker 1, Speaker 2, Speaker 3. The question it answers is who spoke when?
Diarization on its own doesn't tell you what was said, or anyone's real name. It only groups the audio by voice. A readable "who said what" transcript needs speech recognition as well: recognition turns speech into text, and diarization assigns each stretch of text to a speaker. Australian Transcription runs both in one job, which returns the plain transcript and the speaker-labelled segments together.
Diarization vs transcription vs voice recognition
People mix these three terms up. They are different tasks with different outputs, and the difference decides what you can expect back from a service.
Transcription (speech recognition) converts spoken words into written text. Its job is getting the words right. A raw transcript is one continuous block of text with no marker where the speaker changes.
Speaker diarization partitions the audio by distinct voices and labels the segments anonymously. It knows there are two speakers and which parts belong to each, but not their names. You can tell Speaker 1 is the interviewer because they ask the questions; the system only knows that Speaker 1 and Speaker 2 are different people.
Voice recognition (speaker identification) goes one step further and matches a voice to a specific, known person. This requires enrolment: a voiceprint of each individual is captured in advance, and the system compares incoming audio against those enrolled profiles to output a real name. This is the technology behind "Hi, it's me" voice authentication, and it is a different, more invasive capability with its own privacy considerations.
Australian Transcription performs diarization, not voice recognition. It tells you how many distinct speakers there are and which segments belong to each, and never claims a segment was spoken by a named person. You attach the real names yourself, from context.
| Task | Question it answers | Output | Needs enrolment? |
|---|---|---|---|
| Transcription | What was said? | Plain text of the words | No |
| Speaker diarization | Who spoke when? | Segments labelled Speaker 1, Speaker 2, … | No |
| Voice recognition | Which known person is this? | A specific named identity | Yes |
Common use cases
Any recording with more than one voice needs it:
- Meetings on Zoom, Teams or in a room, where each action item has to trace back to the person who committed to it.
- Interviews, where a journalist or researcher needs the questions separated from the answers.
- Medical consults, where the clinician's words and the patient's go into different parts of the notes.
- Depositions, hearings and recorded statements, which depend on knowing who said each line.
- Call centre recordings, split into agent and customer for quality assurance and compliance review.
- Podcasts with several hosts or guests, turned into speaker-attributed transcripts and show notes.
Why diarization is hard
A person listening tracks who's talking without effort. A machine has to solve four separate problems to do the same:
- Overlapping speech. When two people talk at once, both voices are in the same instant of audio, and there is no clean point where one stops and the other starts.
- Similar voices. Two speakers of the same gender, age and accent have voiceprints close enough to confuse, so the system merges them or swaps their labels.
- Crosstalk and background noise. Side conversations, room echo and cheap microphones blur the boundaries between speakers and add voices that aren't participants.
- Unknown speaker count. Without a count, the system has to estimate how many people are present, and a wrong estimate throws off every segment after it.
The last one you can fix yourself. The API takes a maximum number of speakers: set it to the number of people who speak, and brief extra voices won't create extra labels.
How to get speaker labels with the Australian Transcription API
Submit an audio file with the number of speakers you expect, receive a job_id, then poll until its status is completed. That response includes a diarization field: a string with one line per segment, in the form SPEAKER_00 [00:00:01.000 - 00:00:05.240]: Thanks for coming in today. The transcript and diarization are returned once, in that response, so save them then.
During AEST business hours a typical file finishes in under 2 minutes. Outside those hours a cold start adds 5 to 15 minutes, so the sample below polls for up to 20 minutes. Set num_speakers to an integer between 1 and 10 (default 2). Diarization is included in the standard $0.02 AUD per minute price.
import re
import time
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.icana.ai/api/v1"
HEADERS = {"X-API-Key": API_KEY}
SEGMENT_RE = re.compile(r"^(SPEAKER_\d+) \[(\S+) - (\S+)\]: (.*)$")
def diarize(audio_path: str, num_speakers: int = 2) -> str:
"""Submit an audio file and return the diarization string."""
# Step 1: Submit the file, telling the API how many speakers to expect
with open(audio_path, "rb") as f:
response = requests.post(
f"{BASE_URL}/transcribe",
headers=HEADERS,
files={"file": f},
data={"num_speakers": num_speakers},
)
response.raise_for_status()
job_id = response.json()["job_id"]
print(f"Job submitted: {job_id}")
# Step 2: Poll every 10 s for up to 20 minutes (covers a cold start).
# The result is returned once, in the "completed" response, so keep it.
for attempt in range(120):
result = requests.get(
f"{BASE_URL}/jobs/{job_id}",
headers=HEADERS,
)
result.raise_for_status()
data = result.json()
status = data["status"]
print(f"Status: {status}")
if status == "completed":
return data["diarization"] or ""
elif status == "failed":
raise RuntimeError(f"Transcription failed: {data.get('error_message')}")
time.sleep(10)
raise TimeoutError(f"Job {job_id} did not complete within 20 minutes")
if __name__ == "__main__":
diarization = diarize("meeting.mp3", num_speakers=2)
# One line per segment, e.g.
# SPEAKER_00 [00:00:01.000 - 00:00:05.240]: Thanks for coming in today.
for line in diarization.splitlines():
match = SEGMENT_RE.match(line)
if match:
speaker, start, end, text = match.groups()
print(f"[{speaker} | {start} - {end}] {text}")
The diarization string gives you the "who said what" view, while the separate transcription field on the same response gives you the plain, unsegmented transcript. The labels are anonymous (SPEAKER_00, SPEAKER_01 and so on), and you map them to real names yourself. All of this runs in our Sydney datacentre. Your audio is not sent overseas, so there is no cross-border transfer for APP 8 to cover.
Frequently asked questions
What is the difference between diarization and voice recognition?
Diarization groups the audio by voice and gives each group an anonymous label. Voice recognition matches a voice against profiles of known, enrolled people and returns a name. Diarization needs no voice samples from anyone in advance, which is why it works on any recording you already have. Australian Transcription does diarization; you add the names from context.
How many speakers can be detected?
Set num_speakers to any number from 1 to 10. If you leave it out the API assumes 2, so for a panel, a board meeting or a group interview, pass the real count.
Does speaker diarization cost extra?
No. It's part of the $0.02 AUD per minute price, so a one-hour meeting with five people costs $1.20 AUD, speaker labels included.
Is my audio kept in Australia during diarization?
Yes. Transcription and diarization both run in our Sydney datacentre. The audio and transcript files are deleted from storage once the completed result is delivered.
Get speaker-labelled transcripts
Run a recording with three or four voices through it and check the labels yourself. Your first 90 minutes are free, there's no credit card to enter, and speaker labels cost nothing extra.