pnpl.tasks.libribrain.PhonemeClassification

pnpl.tasks.libribrain.PhonemeClassification#

class pnpl.tasks.libribrain.PhonemeClassification(tmin=0.0, tmax=0.5, label_type='phoneme', exclude_phonemes=<factory>, _phonemes_sorted=<factory>, _phoneme_to_id=<factory>)[source]#

Multi-class phoneme classification task.

Each sample is aligned to a phoneme onset in the events file.

Parameters:
  • tmin (float) – Start time relative to phoneme onset (seconds)

  • tmax (float) – End time relative to phoneme onset (seconds)

  • label_type (str) – ‘phoneme’ for multi-class, ‘voicing’ for binary (voiced/unvoiced)

  • exclude_phonemes (list) – List of phonemes to exclude

  • _phonemes_sorted (list)

  • _phoneme_to_id (dict)

__init__(tmin=0.0, tmax=0.5, label_type='phoneme', exclude_phonemes=<factory>, _phonemes_sorted=<factory>, _phoneme_to_id=<factory>)#
Parameters:
  • tmin (float)

  • tmax (float)

  • label_type (str)

  • exclude_phonemes (list)

  • _phonemes_sorted (list)

  • _phoneme_to_id (dict)

Return type:

None

Methods

__init__([tmin, tmax, label_type, ...])

collect_samples(dataset)

Collect phoneme samples from all runs.

get_label(sample)

Extract label ID from sample.

Attributes

label_info

Label metadata.

label_type

tmax

tmin

exclude_phonemes