Back to Label Studio

Intent Classification

docs/source/templates/intent_classification.md

2.2.10-12.0 KB
Original Source

If you want to identify the intent of an audio recording, such as an interview or customer service call, use this template to classify intent by selecting choices and listening to an audio clip.

Interactive Template Preview

<div id="main-preview"></div>

Labeling Configuration

html
<View>
  <Labels name="labels" toName="audio">
    <Label value="Segment" />
  </Labels>
  <Audio name="audio" value="$audio"/>
  <Choices name="intent" toName="audio" perRegion="true" required="true">
    <Choice value="Question" />
    <Choice value="Request" />
    <Choice value="Satisfied" />
    <Choice value="Interested" />
    <Choice value="Unsatisfied" />
  </Choices>
</View>

About the labeling configuration

All labeling configurations must be wrapped in View tags.

Use the Labels control tag to label specific segments of the audio clip:

xml
<Labels name="labels" toName="audio">
    <Label value="Segment" />
</Labels>

Use the Audio object tag to specify the audio data and display an audio wave that can be segmented:

xml
<Audio name="audio" value="$audio"/>

Use the Choices control tag to classify the intent for each segmented region of the audio clip:

xml
  <Choices name="intent" toName="audio" perRegion="true" required="true">
    <Choice value="Question" />
    <Choice value="Request" />
    <Choice value="Satisfied" />
    <Choice value="Interested" />
    <Choice value="Unsatisfied" />
  </Choices>

Because of the perRegion="true" argument, each choice applies to a different segment labeled as a segment. The required="true" argument ensures that each labeled audio segment has a choice selected before the annotation can be submitted.

{% insertmd includes/nested-classification.md %}