Main Content

Audio Labeler

(Removed) Define and visualize ground-truth labels

Audio Labeler has been removed. Use Signal Labeler instead. For more information, see Compatibility Considerations.

Description

The Audio Labeler app enables you to label ground-truth data at both the region level and file level.

Using the app, you can:

  • Create label definitions for consistent and fast labeling.

  • Visualize the time-domain waveform during playback.

  • Interactively specify labels at the file level and region level. You can specify regions by drawing directly on the time-domain waveform.

  • Record new audio to add to your dataset.

  • Apply automatic labeling of detected speech regions.

  • Apply automatic word labeling using third-party speech-to-text transcription services.

The app exports data as a labeledSignalSet object. You can use labeledSignalSet to train a network, classifier, or analyze data and report statistics.

Audio Labeler app

Open the Audio Labeler App

  • MATLAB® toolstrip: On the Apps tab, under Signal Processing and Communications, click the app icon.

  • MATLAB command prompt: Enter audioLabeler.

Examples

expand all

In this example, you create a logical mask for an audio signal where ones correspond to the utterance "yes" and zeros correspond to the absence of the utterance "yes". To create the mask, you use the IBM™ speech-to-text API through the Audio Labeler app.

Listen to the audio file that you want to label and then visualize it in the time domain.

[audioIn,fs] = audioread("KeywordSpeech-16-16-mono-34secs.flac");

sound(audioIn,fs)

t = (0:numel(audioIn)-1)/fs;
plot(t,audioIn)
xlabel('Time (s)')
ylabel('Amplitude')

Open the Audio Labeler app and load the KeywordSpeech-16-16-mono-34secs.flac file into the Data Browser.

Under Automation, click Speech to Text. On the Speech to Text tab, select your preferred speech-to-text API. This example uses the IBM speech-to-text API. Select Segment Words so that the text labels are divided into individual words instead of sentences. Click Run to interface with the speech-to-text API and create a new region of interest (ROI) label. The ROI label contains words detected and labeled by IBM's speech-to-text API.

Close the Speech to Text tab and then export the labeled signal set to the workspace.

The labels are exported to the workspace as labeledSignalSet object with a time stamp. Set the variable labeledSet to the time-stamped labeledSignalSet object.

labeledSet = myLabeledSet;

Inspect the SpeechContent label.

speechContent = labeledSet.Labels.SpeechContent{1}
speechContent=52×2 table
     ROILimits        Value  
    ____________    _________

    0.87    1.31    "first"  
    1.31    1.41    "you"    
    1.41    1.63    "said"   
    1.63    2.22    "yes"    
    2.25    2.52    "then"   
    2.52    3.03    "no"     
    3.09    3.22    "and"    
    3.22    3.32    "you"    
    3.32    3.52    "said"   
    3.52    3.94    "yes"    
    3.94    4.16    "then"   
    4.16    4.66    "no"     
    4.83    5.39    "yes"    
    5.42    5.57    "the"    
    5.57    6.07    "no"     
    6.15    6.56    "driving"
      ⋮

The speech-to-text API returns the limits of the ROI labels in seconds. Use the SpeechContent table to create a logical vector.

keywordLabels = speechContent(speechContent.Value == "yes",:);
keywordROILimitsInSamples = round(keywordLabels.ROILimits*fs);

mask = zeros(size(audioIn),"logical");
for i = 1:size(keywordROILimitsInSamples)
    mask(keywordROILimitsInSamples(i,1):keywordROILimitsInSamples(i,2)) = true;
end

Plot the speech signal and the keyword spotting mask.

plot(t,audioIn, ...
     t,mask)
xlabel('Time (s)')
ylabel('Amplitude')
legend('Audio','Keyword Spotting Mask','Location','southeast')

Programmatic Use

expand all

audioLabeler opens the app, enabling you to label ground-truth data about audio.

Version History

Introduced in R2018b

expand all

R2023a: Audio Labeler has been removed

The Audio Labeler app has been removed. Use Signal Labeler instead.

The Signal Labeler app:

  • Replaces file-level labels with attribute labels to define full-signal characteristics.

  • Uses different line colors for channels of an audio file by default.

  • Does not expose label tags of label definitions. You cannot interactively see, add, or edit label tags for label definitions.

  • Provides two new workflows when running autolabeling algorithms:

    • Label and inspect plotted audio files.

    • Label all audio files or a subset of audio files without inspection.

  • Does not automatically create label definitions when running automation algorithms. To automate the detection of speech content, you must first add logical region-of-interest (ROI) label definitions. To perform speech-to-text transcription, you must first add string ROI label definitions.

  • Requires automation algorithms be run on one channel at a time. For multichannel audio files, you can choose which channel to use as input.

  • Does not provide audio recording.