Helper functions#

comma_join(sequence)

Helper function to combine a list into a human-readable expression with commas and a final "and" separator

make_safe(element)

Helper function to make an element a string

make_scp_safe(string)

Helper function to make a string safe for saving in Kaldi scp files.

load_scp(path[, data_type])

Load a Kaldi script file (.scp)

load_scp_safe(string)

Helper function to load previously made safe text.

score_wer(gold, hypo)

Computes word error rate and character error rate for a transcription

edit_distance(x, y)

Compute edit distance between two sets of labels

output_mapping(mapping, path[, skip_safe])

Helper function to save mapping information (i.e., utt2spk) in Kaldi scp format

compare_labels(ref, test, silence_phone[, ...])

param ref:

overlap_scoring(first_element, ...[, mapping])

Method to calculate overlap scoring

align_phones(ref, test, silence_phone[, ...])

Align phones based on how much they overlap and their phone label, with the ability to specify a custom mapping for different phone labels to be scored as if they're the same phone