Skip to content

Commit

Permalink
fix str2bool (#1792)
Browse files Browse the repository at this point in the history
  • Loading branch information
yfyeung authored Oct 31, 2024
1 parent 87cadfc commit 119e1ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion egs/libriheavy/ASR/local/prepare_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import sys
from pathlib import Path

from icefall.utils import str2bool


def simple_cleanup(text: str) -> str:
table = str.maketrans("’‘,。;?!():-《》、“”【】", "'',.;?!(): <>/\"\"[]")
Expand All @@ -34,7 +36,7 @@ def main():
), "Usage: ./local/prepare_manifest.py INPUT OUTPUT_DIR KEEP_CUSTOM_FIELDS"
fname = Path(sys.argv[1]).name
oname = Path(sys.argv[2]) / fname
keep_custom_fields = bool(sys.argv[3])
keep_custom_fields = str2bool(sys.argv[3])
with gzip.open(sys.argv[1], "r") as fin, gzip.open(oname, "w") as fout:
for line in fin:
cut = json.loads(line)
Expand Down

0 comments on commit 119e1ce

Please sign in to comment.