增加了自动填充路径的功能,增加了根据显存自动选择ASR精度的功能,也可手动控制
增加了自动填充路径的功能 增加了根据显存自动选择ASR精度的功能,也可手动控制
This commit is contained in:
@@ -21,11 +21,13 @@ asr_dict = {
|
||||
'lang': ['zh'],
|
||||
'size': ['large'],
|
||||
'path': 'funasr_asr.py',
|
||||
'precision': ['float32']
|
||||
},
|
||||
"Faster Whisper (多语种)": {
|
||||
'lang': ['auto', 'zh', 'en', 'ja'],
|
||||
'size': check_fw_local_models(),
|
||||
'path': 'fasterwhisper_asr.py'
|
||||
}
|
||||
'path': 'fasterwhisper_asr.py',
|
||||
'precision': ['float32', 'float16', 'int8']
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -101,8 +101,8 @@ if __name__ == '__main__':
|
||||
parser.add_argument("-l", "--language", type=str, default='ja',
|
||||
choices=language_code_list,
|
||||
help="Language of the audio files.")
|
||||
parser.add_argument("-p", "--precision", type=str, default='float16', choices=['float16','float32'],
|
||||
help="fp16 or fp32")
|
||||
parser.add_argument("-p", "--precision", type=str, default='float16', choices=['float16','float32','int8'],
|
||||
help="fp16, int8 or fp32")
|
||||
|
||||
cmd = parser.parse_args()
|
||||
output_file_path = execute_asr(
|
||||
|
||||
@@ -4,7 +4,8 @@ import argparse
|
||||
import os
|
||||
import traceback
|
||||
from tqdm import tqdm
|
||||
|
||||
# from funasr.utils import version_checker
|
||||
# version_checker.check_for_update = lambda: None
|
||||
from funasr import AutoModel
|
||||
|
||||
path_asr = 'tools/asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch'
|
||||
@@ -14,6 +15,7 @@ path_asr = path_asr if os.path.exists(path_asr) else "iic/speech_paraformer-l
|
||||
path_vad = path_vad if os.path.exists(path_vad) else "iic/speech_fsmn_vad_zh-cn-16k-common-pytorch"
|
||||
path_punc = path_punc if os.path.exists(path_punc) else "iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch"
|
||||
|
||||
|
||||
model = AutoModel(
|
||||
model = path_asr,
|
||||
model_revision = "v2.0.4",
|
||||
|
||||
Reference in New Issue
Block a user