游雁
2024-07-29 eb86f0fe6a7605c1e72fb8307d525ee8b8ebfb1e
Merge branch 'main' of github.com:alibaba-damo-academy/FunASR
merge
2个文件已修改
6 ■■■■ 已修改文件
examples/industrial_data_pretraining/paraformer/infer_from_local.sh 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/models/llm_asr/model.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/industrial_data_pretraining/paraformer/infer_from_local.sh
@@ -14,7 +14,7 @@
local_path_root=${workspace}/modelscope_models
mkdir -p ${local_path_root}
local_path=${local_path_root}/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
git clone https://www.modelscope.cn/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git ${local_path}
git lfs clone https://www.modelscope.cn/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git ${local_path}
device="cuda:0" # "cuda:0" for gpu0, "cuda:1" for gpu1, "cpu"
funasr/models/llm_asr/model.py
@@ -812,7 +812,7 @@
            ibest_writer = self.writer[f"{0 + 1}best_recog"]
        results = []
        response_clean = re.sub("[^\w\s\u3000\u4e00-\u9fff]+", "", response)
        response_clean = re.sub(r"[^\w\s\u3000\u4e00-\u9fff]+", "", response)
        result_i = {"key": key[0], "text": response, "text_tn": response_clean, "label": label}
        if loss is not None:
            result_i["loss"] = loss
@@ -1395,7 +1395,7 @@
            ibest_writer = self.writer[f"{0 + 1}best_recog"]
        results = []
        response_clean = re.sub("[^\w\s\u3000\u4e00-\u9fff]+", "", response)
        response_clean = re.sub(r"[^\w\s\u3000\u4e00-\u9fff]+", "", response)
        result_i = {"key": key[0], "text": response, "text_tn": response_clean, "label": label}
        if loss is not None:
            result_i["loss"] = loss