Skip to main content
Pre-recorded Speaker diarization is the process of detecting multiple speakers in an audio, and understanding which parts of the transcription each speaker said.
On multi-channel audio, diarization runs separately on each channel (see with multi-channel audio).

Enabling diarization

Diarization is enabled by sending the diarization parameter in the transcription request:
Pre-recorded

Response

When diarization is enabled, each utterance will contain a speaker field, whose value is an index representing the speaker. Speakers will be assigned indexes by order of appearance (i.e. the 1st speaker will be speaker 0, the 2nd speaker 1, etc).
Pre-recorded

Improving diarization accuracy

You can improve the accuracy of the diarization by providing the model with hints regarding the expected number or lower/upper bounds ofspeakers using the diarization_config.num_of_speakers, diarization_config.min_speakers and diarization_config.max_speakers parameters respectively. Important: These parameters are hints, not hard constraints. The actual number of speakers detected by the model may not comply with the provided parameters.

With multi-channel audio

When diarization is enabled on multi-channel audio, diarization runs separately on each channel. Diarization parameters (number_of_speakers, min_speakers, max_speakers) apply per channel. Speaker indexes are then normalized across channels so IDs stay unique in the result. For example, with two channels and two speakers on each, speakers are numbered from 0 to 3 (four speakers total). Because diarization is run independently per channel, the same physical speaker appearing on two channels will receive two different speaker IDs.