Skip to content

Commit

Permalink
Print DER summary
Browse files Browse the repository at this point in the history
  • Loading branch information
thequilo committed Sep 19, 2024
1 parent cd1b4f1 commit a3821d1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion meeteval/der/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def md_eval_22(
regions=regions,
uem=uem,
)
_save_results(results, hypothesis, per_reco_out, average_out)
_save_results(results, hypothesis, per_reco_out, average_out, wer_name='DER')


def cli():
Expand Down
24 changes: 17 additions & 7 deletions meeteval/wer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,23 @@ def _save_results(
dataclasses.asdict(average),
average_out.format(parent=parent, stem=stem),
)
logging.info(
f'%{wer_name}: {average.error_rate:.2%} '
f'[ {average.errors} / {average.length}, '
f'{average.insertions} ins, '
f'{average.deletions} del, '
f'{average.substitutions} sub ]'
)
if hasattr(average, 'scored_speaker_time'):
error_time = average.missed_speaker_time + average.falarm_speaker_time + average.speaker_error_time
logging.info(
f'%{wer_name}: {average.error_rate:.2%} '
f'[ {error_time:.2f}s / {average.scored_speaker_time:.2f}s, '
f'{average.missed_speaker_time:.2f}s missed, '
f'{average.falarm_speaker_time:.2f}s falarm, '
f'{average.speaker_error_time:.2f}s spk error ]'
)
else:
logging.info(
f'%{wer_name}: {average.error_rate:.2%} '
f'[ {average.errors} / {average.length}, '
f'{average.insertions} ins, '
f'{average.deletions} del, '
f'{average.substitutions} sub ]'
)
return average


Expand Down

0 comments on commit a3821d1

Please sign in to comment.