增加了自动填充路径的功能,增加了根据显存自动选择ASR精度的功能,也可手动控制

增加了自动填充路径的功能
增加了根据显存自动选择ASR精度的功能,也可手动控制
This commit is contained in:
XXXXRT666
2024-08-01 20:53:52 +08:00
committed by GitHub
parent 7670bc77c3
commit 10e885d9ac
22 changed files with 117 additions and 72 deletions

View File

@@ -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']
},
}

View File

@@ -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(

View File

@@ -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",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Reverberation and delay removal model(by FoxJoy):",
"ASR 模型": "ASR model",
"ASR 模型尺寸": "ASR model size",
"数据类型精度": "Computing precision",
"ASR 语言设置": "ASR language",
"ASR进程输出信息": "ASR output log",
"GPT模型列表": "GPT weight list",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Modelos de eliminación de reverberación y retardo (por FoxJoy)",
"ASR 模型": "Modelo ASR",
"ASR 模型尺寸": "Tamaño del modelo ASR",
"数据类型精度": "precisión del tipo de datos",
"ASR 语言设置": "Configuración del idioma ASR",
"ASR进程输出信息": "Información de salida del proceso ASR",
"GPT模型列表": "Lista de modelos GPT",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Modèle de suppression de réverbération et de retard (par FoxJoy) :",
"ASR 模型": "Modèle ASR",
"ASR 模型尺寸": "Taille du modèle ASR",
"数据类型精度": "précision du type de données",
"ASR 语言设置": "Paramètres de langue ASR",
"ASR进程输出信息": "Informations de processus ASR",
"GPT模型列表": "Liste des modèles GPT",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Modello per rimuovere la riverberazione e il ritardo (by FoxJoy):",
"ASR 模型": "Modello ASR",
"ASR 模型尺寸": "Dimensioni del modello ASR",
"数据类型精度": "precisione del tipo di dati",
"ASR 语言设置": "Impostazioni linguistiche ASR",
"ASR进程输出信息": "Informazioni sull'output del processo ASR",
"GPT模型列表": "Elenco dei modelli GPT",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3、リバーブ除去と遅延除去モデルby FoxJoy",
"ASR 模型": "ASR モデル",
"ASR 模型尺寸": "ASRモデルサイズ",
"数据类型精度": "データ型の精度",
"ASR 语言设置": "ASR 言語設定",
"ASR进程输出信息": "ASRプロセスの出力情報",
"GPT模型列表": "GPTモデルリスト",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. 잔향 제거 및 지연 제거 모델 (by FoxJoy):",
"ASR 模型": "ASR 모델",
"ASR 模型尺寸": "ASR 모델 크기",
"数据类型精度": "데이터 유형 정밀도",
"ASR 语言设置": "ASR 언어 설정",
"ASR进程输出信息": "ASR 프로세스 출력 정보",
"GPT模型列表": "GPT 모델 목록",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Modelo de remoção de reverberação e atraso (por FoxJoy):",
"ASR 模型": "Modelo ASR",
"ASR 模型尺寸": "Tamanho do modelo ASR",
"数据类型精度": "precisão do tipo de dado",
"ASR 语言设置": "Configurações de idioma do ASR",
"ASR进程输出信息": "Informações de saída do processo ASR",
"GPT模型列表": "Lista de modelos GPT",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Модель удаления реверберации и задержек (от FoxJoy):",
"ASR 模型": "Модель ASR",
"ASR 模型尺寸": "Размер модели ASR",
"数据类型精度": "точность типа данных",
"ASR 语言设置": "Настройки языка ASR",
"ASR进程输出信息": "Информация о процессе ASR",
"GPT模型列表": "Список моделей GPT",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3. Yankı ve gecikme giderme modeli (FoxJoy tarafından):",
"ASR 模型": "ASR modeli",
"ASR 模型尺寸": "ASR model boyutu",
"数据类型精度": "veri türü doğruluğu",
"ASR 语言设置": "ASR dil ayarları",
"ASR进程输出信息": "ASR işlemi çıktı bilgisi",
"GPT模型列表": "GPT model listesi",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3、去混响、去延迟模型by FoxJoy",
"ASR 模型": "ASR 模型",
"ASR 模型尺寸": "ASR 模型尺寸",
"数据类型精度": "数据类型精度",
"ASR 语言设置": "ASR 语言设置",
"ASR进程输出信息": "ASR进程输出信息",
"GPT模型列表": "GPT模型列表",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3、去混響、去延遲模型by FoxJoy",
"ASR 模型": "ASR 模型",
"ASR 模型尺寸": "ASR 模型尺寸",
"数据类型精度": "數據類型精度",
"ASR 语言设置": "ASR 語言設置",
"ASR进程输出信息": "ASR進程輸出信息",
"GPT模型列表": "GPT模型列表",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3、去混響、去延遲模型by FoxJoy",
"ASR 模型": "ASR 模型",
"ASR 模型尺寸": "ASR 模型尺寸",
"数据类型精度": "數據類型精度",
"ASR 语言设置": "ASR 語言設定",
"ASR进程输出信息": "ASR進程輸出資訊",
"GPT模型列表": "GPT模型列表",

View File

@@ -34,6 +34,7 @@
"3、去混响、去延迟模型by FoxJoy": "3、去混響、去延遲模型by FoxJoy",
"ASR 模型": "ASR 模型",
"ASR 模型尺寸": "ASR 模型尺寸",
"数据类型精度": "數據類型精度",
"ASR 语言设置": "ASR 語言設置",
"ASR进程输出信息": "ASR進程輸出資訊",
"GPT模型列表": "GPT模型列表",