From 37db8a1af4614e8b469335c4cfa886ec4b8153e1 Mon Sep 17 00:00:00 2001 From: pkufool Date: Fri, 4 Aug 2023 09:31:00 +0800 Subject: [PATCH] Minor fixes --- examples/libriheavy/matching.py | 14 ++++++-------- examples/libriheavy/matching_parallel.py | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/libriheavy/matching.py b/examples/libriheavy/matching.py index 00093e8..4019127 100755 --- a/examples/libriheavy/matching.py +++ b/examples/libriheavy/matching.py @@ -361,14 +361,12 @@ def write( for seg in segments: id = f"{current_cut.id}_{cut_segment_index[current_cut.id]}" cut_segment_index[current_cut.id] += 1 - custom = ( - { - "texts": [seg["ref"], seg["hyp"]], - "pre_texts": [seg["pre_ref"], seg["pre_hyp"]], - "begin_byte": seg["begin_byte"], - "end_byte": seg["end_byte"], - }, - ) + custom = { + "texts": [seg["ref"], seg["hyp"]], + "pre_texts": [seg["pre_ref"], seg["pre_hyp"]], + "begin_byte": seg["begin_byte"], + "end_byte": seg["end_byte"], + } if params.output_post_texts: custom["post_texts"] = [seg["post_ref"], seg["post_hyp"]] supervision = SupervisionSegment( diff --git a/examples/libriheavy/matching_parallel.py b/examples/libriheavy/matching_parallel.py index 0395b87..8ad77f5 100755 --- a/examples/libriheavy/matching_parallel.py +++ b/examples/libriheavy/matching_parallel.py @@ -51,7 +51,7 @@ def get_args(): parser.add_argument( "--batch-size", type=int, - default=100, + default=50, help="""The number of cuts in a batch. """, )