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