Skip to content

Commit

Permalink
Fix ctm format, fix normalizers
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Cochrane committed Nov 9, 2023
1 parent 9fcc69d commit e81cb15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/diarization/sm_diarization_metrics/cookbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def get_unknown_speaker_count_for_files(hypothesis_file: str) -> int:
Speaker labels of punctuations are not considered.
If the input file is not in v2 json format, "0" will be returned."""
hypothesis_file_extension = hypothesis_file.split(".")[-1]
if hypothesis_file_extension == "lab":
if hypothesis_file_extension == "lab" or "ctm":
# unknown_speaker only supported for v2 json
return 0
entries = utils.load_v2_json_file(hypothesis_file, get_content_type=True)
Expand Down
2 changes: 2 additions & 0 deletions metrics/wer/normalizers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .basic import BasicTextNormalizer as BasicTextNormalizer
from .english import EnglishTextNormalizer as EnglishTextNormalizer

0 comments on commit e81cb15

Please sign in to comment.