score_wer#

montreal_forced_aligner.helper.score_wer(gold, hypo, filter_brackets=True)[source]#

Computes word error rate and character error rate for a transcription

Parameters:
  • gold (list[str]) – The reference words

  • hypo (list[str]) – The hypothesized words

  • filter_brackets (bool) – Flag for whether to ignore bracketed words

Returns:

  • int – Word Edit distance

  • int – Length of the gold words labels

  • int – Character edit distance

  • int – Length of the gold characters