mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update repo
This commit is contained in:
parent
0f3a4ca84d
commit
69cb9ed756
@ -227,12 +227,16 @@ class_choices_list = [
|
||||
|
||||
def build_asr_model(args):
|
||||
# token_list
|
||||
if args.token_list is not None:
|
||||
with open(args.token_list) as f:
|
||||
if isinstance(args.token_list, str):
|
||||
with open(args.token_list, encoding="utf-8") as f:
|
||||
token_list = [line.rstrip() for line in f]
|
||||
args.token_list = list(token_list)
|
||||
vocab_size = len(token_list)
|
||||
logging.info(f"Vocabulary size: {vocab_size}")
|
||||
elif isinstance(args.token_list, (tuple, list)):
|
||||
token_list = list(args.token_list)
|
||||
vocab_size = len(token_list)
|
||||
logging.info(f"Vocabulary size: {vocab_size}")
|
||||
else:
|
||||
vocab_size = None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user