Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
fix infer_after_finetune.py
jmwang6665b35ca42351
diff --git a/egs_modelscope/asr/data2vec/speech_data2vec_pretrain-zh-cn-aishell2-16k-pytorch/infer_after_finetune.py b/egs_modelscope/asr/data2vec/speech_data2vec_pretrain-zh-cn-aishell2-16k-pytorch/infer_after_finetune.pyindex b37fc97f3..e163999b7 100644--- a/egs_modelscope/asr/data2vec/speech_data2vec_pretrain-zh-cn-aishell2-16k-pytorch/infer_after_finetune.py+++ b/egs_modelscope/asr/data2vec/speech_data2vec_pretrain-zh-cn-aishell2-16k-pytorch/infer_after_finetune.py@@ -37,7 +37,7 @@ def modelscope_infer_after_finetune(params):# computer CER if GT text is settext_in = os.path.join(params["data_dir"], "text")- if text_in is not None:+ if os.path.exists(text_in):text_proc_file = os.path.join(decoding_path, "1best_recog/token")compute_wer(text_in, text_proc_file, os.path.join(decoding_path, "text.cer"))diff --git a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell1-vocab8404-pytorch/infer_after_finetune.py b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell1-vocab8404-pytorch/infer_after_finetune.pyindex abe4d564b..6c34ed099 100644--- a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell1-vocab8404-pytorch/infer_after_finetune.py+++ b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell1-vocab8404-pytorch/infer_after_finetune.py@@ -38,7 +38,7 @@ def modelscope_infer_after_finetune(params):# computer CER if GT text is settext_in = os.path.join(params["data_dir"], "text")- if text_in is not None:+ if os.path.exists(text_in):text_proc_file = os.path.join(decoding_path, "1best_recog/token")compute_wer(text_in, text_proc_file, os.path.join(decoding_path, "text.cer"))diff --git a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell2-vocab8404-pytorch/infer_after_finetune.py b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell2-vocab8404-pytorch/infer_after_finetune.pyindex 547b22368..6140bb71f 100644--- a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell2-vocab8404-pytorch/infer_after_finetune.py+++ b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-aishell2-vocab8404-pytorch/infer_after_finetune.py@@ -38,7 +38,7 @@ def modelscope_infer_after_finetune(params):# computer CER if GT text is settext_in = os.path.join(params["data_dir"], "text")- if text_in is not None:+ if os.path.exists(text_in):text_proc_file = os.path.join(decoding_path, "1best_recog/token")compute_wer(text_in, text_proc_file, os.path.join(decoding_path, "text.cer"))diff --git a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer_after_finetune.py b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer_after_finetune.pyindex 30483a0a0..94393ec5e 100644--- a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer_after_finetune.py+++ b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer_after_finetune.py@@ -38,7 +38,7 @@ def modelscope_infer_after_finetune(params):# computer CER if GT text is settext_in = os.path.join(params["data_dir"], "text")- if text_in is not None:+ if os.path.exists(text_in):text_proc_file = os.path.join(decoding_path, "1best_recog/token")compute_wer(text_in, text_proc_file, os.path.join(decoding_path, "text.cer"))diff --git a/egs_modelscope/asr/paraformer/speech_paraformer_asr_nat-zh-cn-8k-common-vocab8358-tensorflow1/infer_after_finetune.py b/egs_modelscope/asr/paraformer/speech_paraformer_asr_nat-zh-cn-8k-common-vocab8358-tensorflow1/infer_after_finetune.pyindex cd13d7613..96102ccfa 100644--- a/egs_modelscope/asr/paraformer/speech_paraformer_asr_nat-zh-cn-8k-common-vocab8358-tensorflow1/infer_after_finetune.py+++ b/egs_modelscope/asr/paraformer/speech_paraformer_asr_nat-zh-cn-8k-common-vocab8358-tensorflow1/infer_after_finetune.py@@ -38,7 +38,7 @@ def modelscope_infer_after_finetune(params):# computer CER if GT text is settext_in = os.path.join(params["data_dir"], "text")- if text_in is not None:+ if os.path.exists(text_in):text_proc_file = os.path.join(decoding_path, "1best_recog/token")compute_wer(text_in, text_proc_file, os.path.join(decoding_path, "text.cer"))