Speech to Text › Diarization

Diarization

Identify and label the speakers in multi-speaker Arabic audio, then get each speaker segment aligned with transcribed text and timestamps — who said what in meetings, interviews, podcasts and conversations.

1

Endpoint

POST /api/v1/audio/diarization/transcribe

Authenticate with your API key in the x-api-key header. See Authentication.

HeaderValue
x-api-keyYOUR_MUNSIT_API_KEY
2

Request

Send the body as multipart/form-data. How it works: you upload a multi-speaker file, Munsit identifies speaker turns and assigns speaker labels, and you receive transcription, diarization segments, and merged speaker-labeled text with timing.

FieldTypeRequiredDescription
filefileYesAudio file in a supported format — see what you can send.
modelstringNoASR model to use: munsit (default) or munsit-en-ar (mixed Arabic-English with code-switching).
Transcribe-only options. hotwords, language and return_confidence apply to POST /audio/transcribe only.
Only need to know who said what? Add diarize=true to POST /audio/transcribe and the same transcript comes back with a speaker number on every word and the speech grouped into utterances. This endpoint adds the speaker segments (diarization) and the speaker-labeled text merged with them (merged), and its results can feed Diarization + sentiment.
Pricing. 110 credits per minute of audio: the transcription base rate plus speaker labels, the same as diarize=true on POST /audio/transcribe. See Cost calculation.
3

Example request

Works like Transcribe, with speaker labels added to the response.

bash
curl -X POST "https://api.munsit.com/api/v1/audio/diarization/transcribe" \ -H "x-api-key: $MUNSIT_API_KEY" \ -F "file=@interview.mp3" \ -F "model=munsit"
Response — 200
{ "statusCode": 200, "data": { "transcription": { "transcription": "السلام عليكم ورحمة الله وبركاته. كيف حالك اليوم؟", "timestamps": [ { "word": "السلام", "start": 0.0, "end": 1.2 } ] }, "diarization": { "segments": [ { "start": 0.0, "end": 8.5, "speaker": "SPEAKER_00" } ] }, "merged": [ { "start": 0.0, "end": 8.5, "speaker": "SPEAKER_00", "text": "السلام عليكم ورحمة الله وبركاته" } ], "duration": 53.661375 }, "message": "Success" }
4

Response fields

Three views of the same audio arrive under data: the raw transcript, the speaker segments, and the two merged together.

FieldTypeDescription
transcriptionobjectTranscript and word-level timestamps.
diarizationobjectSpeaker segments with start/end labels.
mergedarray of objects (start, end, speaker, text)Combined diarization + transcript.
durationnumberTotal duration in seconds.
transcriptionIdstring (UUID)Transcription identifier. Use it as the path parameter for diarization sentiment analysis.
originalTranscriptstringRaw verbatim transcript.
attributesobjectInternal metadata blob persisted with the transcription. Prefer the named fields — treat this as unstable.
statsobject (fileName, fileSize, mimeType, creditsConsumed)Upload metadata and the credits billed for this request.
Most apps only need merged. Each entry is one speaker turn — speaker, its text, and start/end timing — ready to render as a conversation.
5

Go further

What to run on a diarized conversation next.

Working with an AI assistant? Every page is available as Markdown: add .md to the URL, or send an Accept: text/markdown header. For the whole documentation in one request, point it at llms-full.txt; the page index is llms.txt. Or use Copy Page, top right.