From 616be20db3cf94f1cd663782fea61b2370704193 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Wed, 6 Mar 2024 18:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9C=E7=94=A8=E8=8B=B1=E6=96=87AS?= =?UTF-8?q?R=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=E5=85=88=E4=B8=8B?= =?UTF-8?q?=E4=B8=AD=E6=96=87funasr=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如果用英文ASR不再需要先下中文funasr模型 --- tools/asr/fasterwhisper_asr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/asr/fasterwhisper_asr.py b/tools/asr/fasterwhisper_asr.py index 9371324..f7b31aa 100644 --- a/tools/asr/fasterwhisper_asr.py +++ b/tools/asr/fasterwhisper_asr.py @@ -10,7 +10,6 @@ from faster_whisper import WhisperModel from tqdm import tqdm from tools.asr.config import check_fw_local_models -from tools.asr.funasr_asr import only_asr os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE" @@ -70,6 +69,8 @@ def execute_asr(input_folder, output_folder, model_size, language,precision): if info.language == "zh": print("检测为中文文本,转funasr处理") + if("only_asr"not in globals()): + from tools.asr.funasr_asr import only_asr##如果用英文就不需要导入下载模型 text = only_asr(file) if text == '':