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 asr result is empty and punc error
lzr265946ad873c50eed0
diff --git a/funasr/bin/asr_inference_paraformer_vad_punc.py b/funasr/bin/asr_inference_paraformer_vad_punc.pyindex cb33b16b3..a8af83591 100644--- a/funasr/bin/asr_inference_paraformer_vad_punc.py+++ b/funasr/bin/asr_inference_paraformer_vad_punc.py@@ -635,9 +635,15 @@ def inference_modelscope(text_postprocessed, time_stamp_postprocessed, word_lists = postprocessed_result[0], \postprocessed_result[1], \postprocessed_result[2]- text_postprocessed_punc, punc_id_list = text2punc(word_lists, 20)- text_postprocessed_punc_time_stamp = "predictions: {} time_stamp: {}".format(- text_postprocessed_punc, time_stamp_postprocessed)+ if len(word_lists) > 0:+ text_postprocessed_punc, punc_id_list = text2punc(word_lists, 20)+ text_postprocessed_punc_time_stamp = "predictions: {} time_stamp: {}".format(+ text_postprocessed_punc, time_stamp_postprocessed)+ else:+ text_postprocessed_punc = ""+ punc_id_list = []+ text_postprocessed_punc_time_stamp = ""+else:text_postprocessed = ""time_stamp_postprocessed = ""