Identify speakers
A transcript answers what was said; this endpoint takes a first pass at breaking a recording into turns.
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.
It listens for the pauses between stretches of speech and cuts the audio into segments, labeling them as alternating turns (Speaker 1, Speaker 2) with start and end timing. Read the boundary honestly: it segments turns by silence, it does not identify voices or work out the true number of distinct speakers.
What this task actually does
It runs a lightweight turn segmentation, not acoustic speaker recognition. The recording is transcribed, and wherever there is a long enough pause between segments the label flips to the next turn, alternating between two tags. That gives you a segmented, timestamped structure — a readable back-and-forth rather than one undifferentiated block — which is genuinely useful as a first pass on a two-person conversation. What it is not is a model that listens to voice characteristics and decides who is who; the labels come from the rhythm of pauses, not from telling one voice from another.
What the task returns
POST an audio file to /audio/diarize and the task returns a list of turns: each turn carries a speaker label (Speaker 1 or Speaker 2), the text of that stretch, and its start and end timing. It also reports how many distinct labels it used, which for this pause-based approach is at most two — that count is a property of the segmentation, not a measurement of how many people are really in the room. Combined with a transcript you get a script-like, timestamped structure that is easy to skim.
Where the pause-based approach fits and where it doesn't
It fits a clean two-person exchange — an interview, a one-on-one call — where speakers mostly take turns and pauses line up with the change of voice. It does not fit a panel with several participants, heavy crosstalk, or a case where you need each real person tracked consistently across the whole recording: alternating two labels by silence will mislabel those. If your workflow needs the actual number of speakers determined or voices matched to identities, that is a different, heavier task than this endpoint performs, and this page won't pretend otherwise.
Where a turn segmentation is still useful
Even without true speaker recognition, splitting a two-person recording into timestamped turns saves real work: it turns a wall of transcript into a legible exchange you can scan, cite by timing, or feed into a notes step. Support teams reviewing a single agent-and-customer call, journalists cleaning up a one-on-one interview, and producers chopping a two-host segment into readable turns all get value from a first-pass structure they can correct by hand where it matters, rather than starting from an undifferentiated block.
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. The task processes asynchronously — submit the audio, get a task_id immediately, and collect the turn-segmented 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
Two-person interview turns
A journalist runs a one-on-one recorded interview through the endpoint to break it into timestamped turns, turning a raw transcript into a readable back-and-forth to correct by hand.
Agent-and-customer call review
A support team splits a single recorded call into alternating turns to make review faster, without expecting the tool to identify who is who by voice.
Two-host segment cleanup
A producer chops a two-host recording into timestamped turns as a first pass before editing show notes, correcting any mislabels manually.
First-pass structure before notes
A pipeline segments a conversation into turns and timing before a summarization step, giving the later stage a structured input instead of a flat block.
FAQ
What does this endpoint actually do?
It segments a recording into turns by detecting the pauses between stretches of speech, labeling them as alternating turns (Speaker 1, Speaker 2) with start and end timing. It is a pause-based turn segmentation, not acoustic speaker recognition.
Does it determine how many speakers are in the recording?
No. It alternates between two labels based on pauses, so it does not work out the true number of distinct speakers. The label count it reports is a property of the segmentation, not a measurement of how many people are present.
Does it identify which specific person is talking?
No. The labels come from the rhythm of pauses, not from telling one voice from another, so it does not identify speakers or match voices to identities. On a clean two-person exchange the alternating labels usually line up with the two speakers; with more voices or heavy crosstalk they will not.
How is this different from transcription?
Transcription produces the words that were said; this task adds a turn structure and timing on top, splitting the text into alternating, timestamped segments so a two-person recording reads as an exchange rather than one block.
Is this endpoint 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 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.
When will the turns be wrong?
On recordings with more than two speakers, heavy overlap, or long pauses within one person's speech, alternating two labels by silence will mislabel turns. Treat the output as a first pass to correct, not a final attribution.
What happens if the task 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, by email and from Telegram — and soon from our app too.
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. |