fix style

This commit is contained in:
Pingfeng Luo 2021-11-17 18:22:31 +08:00
parent cbad2311a8
commit 675ae1334d
5 changed files with 3 additions and 4 deletions

View File

@ -5,6 +5,7 @@ max-line-length = 80
per-file-ignores = per-file-ignores =
# line too long # line too long
egs/librispeech/ASR/*/conformer.py: E501, egs/librispeech/ASR/*/conformer.py: E501,
egs/aishell/ASR/*/conformer.py: E501,
exclude = exclude =
.git, .git,

View File

@ -107,4 +107,3 @@ if __name__ == "__main__":
args = get_args() args = get_args()
compute_fbank_aishell(num_mel_bins=args.num_mel_bins) compute_fbank_aishell(num_mel_bins=args.num_mel_bins)

View File

@ -87,6 +87,7 @@ def compute_fbank_musan(num_mel_bins: int = 80):
) )
musan_cuts.to_json(musan_cuts_path) musan_cuts.to_json(musan_cuts_path)
def get_args(): def get_args():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument( parser.add_argument(

View File

@ -33,10 +33,9 @@ and generates the following files in the directory `lang_dir`:
- tokens.txt - tokens.txt
""" """
import argparse
import re import re
from pathlib import Path from pathlib import Path
from typing import Dict, List, Tuple from typing import Dict, List
import k2 import k2
import torch import torch

View File

@ -903,4 +903,3 @@ def rescore_with_attention_decoder(
key = f"ngram_lm_scale_{n_scale}_attention_scale_{a_scale}" key = f"ngram_lm_scale_{n_scale}_attention_scale_{a_scale}"
ans[key] = best_path ans[key] = best_path
return ans return ans