---
title: Speaker Diarization
type: templates
category: Audio/Speech Processing
cat: audio-speech-processing
order: 325
meta_title: Speaker Diarization (Segmentation) Data Labeling Template

When preparing audio transcripts or training a machine learning model to differentiate between different speakers, use this template to perform speaker segmentation and label different regions of an audio clip with different speakers.
<View>
<Labels name="label" toName="audio" zoom="true" hotkey="ctrl+enter">
<Label value="Speaker one" background="#00FF00"/>
<Label value="Speaker two" background="#12ad59"/>
</Labels>
<Audio name="audio" value="$audio" />
</View>
All labeling configurations must be wrapped in View tags.
Use the Labels control tag to allow annotators to highlight specific regions of the audio clip and apply a label:xml <Labels name="label" toName="audio" zoom="true" hotkey="ctrl+enter"> <Label value="Speaker one" background="#00FF00"/> <Label value="Speaker two" background="#12ad59"/> </Labels>
Use the Audio object tag to display a waveform of audio and allow annotators to change the speed of the audio playback:xml <Audio name="audio" value="$audio" />