speechbrain.dataio.wer moduleο
WER print functions.
The functions here are used to print the computed statistics with human-readable formatting. They have a file argument, but you can also just use contextlib.redirect_stdout, which may give a nicer syntax.
- Authors
Aku Rouhe 2020
Summaryο
Functions:
Print WER summary and alignments. |
|
Prints out WER summary details in human-readable format. |
Referenceο
- speechbrain.dataio.wer.print_wer_summary(wer_details, file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]ο
Prints out WER summary details in human-readable format.
This function essentially mirrors the Kaldi compute-wer output format.
- Parameters:
wer_details (dict) β Dict of wer summary details, see
speechbrain.utils.edit_distance.wer_summaryfor format.file (stream) β Where to write. (default: sys.stdout)
- speechbrain.dataio.wer.print_alignments(details_by_utterance, file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, empty_symbol='<eps>', separator=' ; ', print_header=True, sample_separator=None)[source]ο
Print WER summary and alignments.
- Parameters:
details_by_utterance (list) β List of wer details by utterance, see
speechbrain.utils.edit_distance.wer_details_by_utterancefor format. Has to have alignments included.file (stream) β Where to write. (default: sys.stdout)
empty_symbol (str) β Symbol to use when aligning to nothing.
separator (str) β String that separates each token in the output. Note the spaces in the default.
print_header (bool) β Whether to print headers
sample_separator (str) β A separator to put between samples (optional)