编辑 | blame | 历史 | 原始文档

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

meta_description: Template for segmenting an audio clip based on speaker with Label Studio for your machine learning and data science projects.

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.

Interactive Template Preview

Labeling Configuration

<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>

About the labeling configuration

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" />

Related tags