Skip to main content
RunAnywhere.diarization.diarize returns who spoke when. It gives time ranges, not text, so pair it with transcription when you need both.
It throws SDKException when the SDK is not initialized or no diarization model is loaded. Unlike the generation verbs, diarize does not auto-load: load the model yourself first with RunAnywhere.models.load(id).

DiarizationResult

segments is a List<SpeakerSegment> in chronological order, and speakerCount is the number of distinct speakers found. SpeakerSegment carries speakerId, startMs, and endMs. Speaker labels are stable only within one call.

DiarizationOptions

The sample rate, channel count, and encoding come from the AudioInput you pass, so raw PCM and Float32 both work without extra configuration.

Labelling a transcript

For per-word speaker labels, ask STT for them instead. SttOptions(diarization: true) puts a speakerId on every Word. See STT options. Use diarize when you want the speaker turns on their own, for instance to split a long recording before transcribing each speaker separately.

Models

Diarization models register under MODEL_CATEGORY_SPEAKER_DIARIZATION. Register a backend that serves the diarization primitive, then load the model.

See also

STT options

Per-word speaker labels

Models

Registration and loading