ldc_bpcsad.io
.load_audacity_label_file
- ldc_bpcsad.io.load_audacity_label_file(fpath, target_labels=None, ignored_labels=None)[source]
Load speech segments from Audacity label file.
If both target_labels and ignore_labels are unset, then all segments in fpath will be considered speech segments. If target_labels is set, then only segments from fpath with a label in target_labels will be returned. If ignored_labels is set, then only segments from fpath with a label NOT in ignore_labels will be returned.
- Parameters:
fpath (pathlib.Path) – Path to file in Audacity label file format.
target_labels (Iterable[str], optional) – Target labels. All segments in fpath with with one of these labels will be considered speech segments. (Default: None)
ignored_labels (Iterable[str], optional) – Labels to ignore. Output will be filtered so that segments with a label from this set will be skipped. If
None
, then no filtering is performed. (Default: None)
- Returns:
Speech segments.
- Return type:
List[Segment]
Notes
https://manual.audacityteam.org/man/importing_and_exporting_labels.html