fix style

This commit is contained in:
PingFeng Luo 2021-12-31 19:11:24 +08:00
parent 46eab8b727
commit 6813b754e9
5 changed files with 26 additions and 14 deletions

View File

@ -128,7 +128,12 @@ def compute_fbank_wenetspeech(args):
output_dir = Path("data/fbank")
dataset_parts = (
"L", "M", "S", "DEV", "TEST_NET", "TEST_MEETING",
"L",
"M",
"S",
"DEV",
"TEST_NET",
"TEST_MEETING",
)
manifests = read_manifests_if_cached(
dataset_parts=dataset_parts,

View File

@ -49,7 +49,12 @@ def preprocess_wenet_speech():
output_dir.mkdir(exist_ok=True)
dataset_parts = (
"L", "M", "S", "DEV", "TEST_NET", "TEST_MEETING",
"L",
"M",
"S",
"DEV",
"TEST_NET",
"TEST_MEETING",
)
logging.info("Loading manifest (may take 10 minutes)")

View File

@ -40,8 +40,9 @@ def get_parser():
parser.add_argument(
"--skip-ncols", "-s", default=0, type=int, help="skip first n columns"
)
parser.add_argument("--space", default="<space>", type=str,
help="space symbol")
parser.add_argument(
"--space", default="<space>", type=str, help="space symbol"
)
parser.add_argument(
"--non-lang-syms",
"-l",
@ -49,8 +50,9 @@ def get_parser():
type=str,
help="list of non-linguistic symobles, e.g., <NOISE> etc.",
)
parser.add_argument("text", type=str, default=False, nargs="?",
help="input text")
parser.add_argument(
"text", type=str, default=False, nargs="?", help="input text"
)
parser.add_argument(
"--trans_type",
"-t",
@ -87,7 +89,7 @@ def main():
while line:
x = line.split()
print(" ".join(x[: args.skip_ncols]), end=" ")
a = " ".join(x[args.skip_ncols:])
a = " ".join(x[args.skip_ncols :])
# get all matched positions
match_pos = []
@ -117,7 +119,7 @@ def main():
i += 1
a = chars
a = [a[j:j + n] for j in range(0, len(a), n)]
a = [a[j : j + n] for j in range(0, len(a), n)]
a_flat = []
for z in a: