Identify speakers
A transcript answers what was said; diarization answers who said it. This endpoint listens to a recording, works out how many distinct speakers are present, and labels every segment with a speaker tag and timing — the piece transcription alone leaves blank on any conversation with more than one voice.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The problem that only shows up with two voices
A single-speaker recording never needs this: one voice, one transcript, no ambiguity about who's talking. The moment a second voice enters — an interview, a support call, a panel, a deposition — a plain transcript becomes a wall of undifferentiated text where a reader has to guess who said what from context alone. Diarization is the step that turns that wall back into a legible conversation.
What the task returns
POST an audio file to /audio/diarize and the task segments the recording by speaker, assigning each segment a speaker label like Speaker 1 or Speaker 2 along with start and end timing, without needing to know in advance how many people are on the recording. It answers who was talking and when, which combines naturally with a transcript to produce a labeled, readable exchange rather than a single undifferentiated block.
How diarization differs from transcription and voice ID
Diarization is not the same task as transcription — it doesn't need to know what was said to work out that a different voice started talking — and it's not the same as voice identification, which would require already knowing who each speaker is by name. It answers a narrower, more mechanical question: how many voices are here, and when does each one hold the floor. That narrower scope is exactly what makes it reliable across recordings where the participants are anonymous or unknown in advance.
Where it gets used
Call centers use it to separate agent from customer without a dedicated dual-channel recording setup, journalists and researchers use it to keep multi-person interviews readable, and legal and compliance teams use it to structure recorded depositions and hearings into a reviewable format. Combine the speaker segments with a transcript and you get a script-like exchange labeled by speaker, which is what most of these use cases actually need rather than raw text or raw timing alone.
Pricing and how it's billed
The cost is a small base fee per request plus a per-minute rate tied to the length of the recording, published on this page with no hidden multiplier for the number of speakers detected. The task processes asynchronously — submit the audio, get a task_id immediately, and collect the speaker-labeled result by signed webhook or from a signed link valid for 24 hours; a failed job retries automatically up to three times and is never charged if it still can't complete.
What you can do with it
Multi-speaker interview transcripts
A journalist runs a recorded interview through the endpoint to label who said what, turning a raw recording into a readable, attributable transcript.
Call center quality review
A support team separates agent speech from customer speech on recorded calls without needing dual-channel recordings, making review and coaching faster.
Legal deposition and hearing review
A legal team structures a recorded deposition into speaker-labeled segments to make review and citation of specific statements far faster.
Panel and roundtable content production
A podcast producer diarizes a multi-guest recording to auto-generate speaker-labeled show notes and pull individual quotes accurately.
FAQ
What does a speaker diarization API actually do?
It analyzes an audio recording and labels which speaker is talking during each segment with start and end timing, without needing to know the speakers' identities in advance.
Do I need to know how many speakers are in the recording?
No, the task determines the number of distinct speakers present in the audio automatically as part of the analysis.
How is diarization different from transcription?
Transcription produces the words that were said; diarization produces who said which segment and when. Combine both to get a labeled, readable transcript of a multi-speaker recording.
Can it identify speakers by name?
No, diarization labels speakers generically, like Speaker 1 and Speaker 2, based on voice differences in the audio; it doesn't match voices to known identities.
Is the speaker diarization API free to use?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How do I get the diarization result back?
The task returns a task_id immediately and processes asynchronously; results arrive by signed webhook or from a signed link valid for 24 hours.
Does it work on phone calls and low-quality audio?
It's designed to work on typical recorded conversations including calls; audio with heavy overlap or very poor quality can reduce segment accuracy like any speech analysis task.
What happens if diarization fails?
The task retries automatically up to three times before returning a clear error, and a failed request is never charged.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/audio/diarize \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"audio":"https://ejemplo.com/audio.mp3"}'const res = await fetch("https://api.kit.forhosting.com/audio/diarize", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"audio": "https://ejemplo.com/audio.mp3"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/audio/diarize",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"audio": "https://ejemplo.com/audio.mp3"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/audio/diarize", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"audio":"https://ejemplo.com/audio.mp3"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"audio":"https://ejemplo.com/audio.mp3"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/audio/diarize", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"audio": "https://ejemplo.com/audio.mp3"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "audio.diarize",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 200 |
max_minutes | 180 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |