diff --git a/meeteval/der/__main__.py b/meeteval/der/__main__.py index f7861ca0..1da32d18 100644 --- a/meeteval/der/__main__.py +++ b/meeteval/der/__main__.py @@ -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(): diff --git a/meeteval/wer/__main__.py b/meeteval/wer/__main__.py index de8454c3..303beb9b 100644 --- a/meeteval/wer/__main__.py +++ b/meeteval/wer/__main__.py @@ -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