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_summary
for 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=' ; ')[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_utterance
for 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.