Skip to main content
Diarization segments a recording by speaker. It answers “who spoke when”, not “what did they say”; pair it with transcription for both.

Options

mergeGapMs is the one to tune. Natural speech has pauses inside a turn, and without merging you get one speaker fragmented into a dozen segments.

Diarization inside transcription

For a transcript labelled by speaker rather than a separate segment list, ask the STT namespace instead:
Use the STT route when you want a readable transcript. Use the diarization namespace when you want timing, for example to drive a speaker timeline or to split a recording into per-speaker files.

Knowing the speaker count helps

maxSpeakers on the STT path, and a sensible threshold here, both improve accuracy a lot when you know how many people are in the room. Diarization over-segments when left to guess.

Streaming

Swift is the only SDK with a streaming diarizer:
Use it to label speakers live in a meeting view rather than after the recording ends.