mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 10:16:14 +00:00
fix style
This commit is contained in:
parent
a82d826987
commit
1717b26cab
@ -317,8 +317,9 @@ def lexicon_to_fst(
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--lang-dir", type=str,
|
||||
help="The lang dir, data/lang_phone")
|
||||
parser.add_argument(
|
||||
"--lang-dir", type=str, help="The lang dir, data/lang_phone"
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
@ -339,18 +339,17 @@ class AishellAsrDataModule:
|
||||
@lru_cache()
|
||||
def train_cuts(self) -> CutSet:
|
||||
logging.info("About to get train cuts")
|
||||
cuts_train = load_manifest(self.args.manifest_dir /
|
||||
"cuts_train.json.gz")
|
||||
cuts_train = load_manifest(
|
||||
self.args.manifest_dir / "cuts_train.json.gz"
|
||||
)
|
||||
return cuts_train
|
||||
|
||||
@lru_cache()
|
||||
def valid_cuts(self) -> CutSet:
|
||||
logging.info("About to get dev cuts")
|
||||
return load_manifest(self.args.manifest_dir /
|
||||
"cuts_dev.json.gz")
|
||||
return load_manifest(self.args.manifest_dir / "cuts_dev.json.gz")
|
||||
|
||||
@lru_cache()
|
||||
def test_cuts(self) -> List[CutSet]:
|
||||
logging.info("About to get test cuts")
|
||||
return load_manifest(self.args.manifest_dir /
|
||||
"cuts_test.json.gz")
|
||||
return load_manifest(self.args.manifest_dir / "cuts_test.json.gz")
|
||||
|
@ -555,7 +555,7 @@ def run(rank, world_size, args):
|
||||
graph_compiler = CharCtcTrainingGraphCompiler(
|
||||
lexicon=lexicon,
|
||||
device=device,
|
||||
oov='<unk>',
|
||||
oov="<unk>",
|
||||
)
|
||||
|
||||
params.blank_id = graph_compiler.texts_to_ids("<blk>")[0][0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user