Merge branch 'main' of github.com:alibaba-damo-academy/FunASR
merge
| | |
| | | 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" |
| | | |
| | |
| | | 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 |
| | |
| | | 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 |