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
better asr text result with json style output
fangd123e10d648c85fd
diff --git a/funasr/bin/asr_inference_paraformer_vad_punc.py b/funasr/bin/asr_inference_paraformer_vad_punc.pyindex a8af83591..7a539e4ee 100644--- a/funasr/bin/asr_inference_paraformer_vad_punc.py+++ b/funasr/bin/asr_inference_paraformer_vad_punc.py@@ -3,6 +3,7 @@ import argparseimport loggingimport sysimport time+import jsonfrom pathlib import Pathfrom typing import Optionalfrom typing import Sequence@@ -637,8 +638,9 @@ def inference_modelscope(postprocessed_result[2]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)+ text_postprocessed_punc_time_stamp = json.dumps({"predictions": text_postprocessed_punc,+ "time_stamp": time_stamp_postprocessed},+ ensure_ascii=False)else:text_postprocessed_punc = ""punc_id_list = []