Skip to content

Commit

Permalink
Fixed typos and errors in manifest_utils.py
Browse files Browse the repository at this point in the history
Signed-off-by: Taejin Park <tango4j@gmail.com>
  • Loading branch information
tango4j committed Dec 18, 2023
1 parent eb163fe commit 1166231
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nemo/collections/asr/parts/utils/manifest_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
def get_rounded_str_float(
num: float,
output_precision: int,
min_precision=1,
max_precision=3
min_precision: int=1,
max_precision: int=3,
)-> str:
"""
Get a string of a float number with rounded precision.
Expand Down Expand Up @@ -69,7 +69,7 @@ def get_ctm_line(
output_precision: int = 2,
) -> str:
"""
Get a line in Conversation Time Mark (CTM) format. Following CTM format appeared in `Rich Transcription Meeting Eval Plan: RT09` document.
Get a line in Conversation Time Mark (CTM) format. Following CTM format appeared in `Rich Transcription Meeting Eval Plan: RT09` document.
CTM Format:
<SOURCE><SP><CHANNEL><SP><BEG-TIME><SP><DURATION><SP><TOKEN><SP><CONF><SP><TYPE><SP><SPEAKER><NEWLINE>
Expand Down Expand Up @@ -108,7 +108,7 @@ def get_ctm_line(

if type(conf) == str and conf.replace('.', '', 1).isdigit():
conf = float(conf)
elif type(duration) != float:
elif type(conf) != float:
raise ValueError(f"`conf` must be a float or str containing float, but got {type(conf)}")

if channel is not None and type(channel) != int:
Expand Down

0 comments on commit 1166231

Please sign in to comment.