fix style

This commit is contained in:
PingFeng Luo 2021-12-31 09:39:39 +08:00
parent a82d826987
commit 1717b26cab
3 changed files with 9 additions and 9 deletions

View File

@ -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()

View File

@ -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")

View File

@ -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]