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
modify paraformer-online funcs
雾聪dfe78d1877c3
diff --git a/runtime/onnxruntime/src/paraformer-online.cpp b/runtime/onnxruntime/src/paraformer-online.cppindex ed7a35ae3..3b629c59a 100644--- a/runtime/onnxruntime/src/paraformer-online.cpp+++ b/runtime/onnxruntime/src/paraformer-online.cpp@@ -469,7 +469,7 @@ string ParaformerOnline::ForwardChunk(std::vector<std::vector<float>> &chunk_feareturn result;}-string ParaformerOnline::Forward(float* din, int len, bool input_finished, const std::vector<std::vector<float>> &hw_emb)+string ParaformerOnline::Forward(float* din, int len, bool input_finished, const std::vector<std::vector<float>> &hw_emb, void* wfst_decoder){std::vector<std::vector<float>> wav_feats;std::vector<float> waves(din, din+len);diff --git a/runtime/onnxruntime/src/paraformer-online.h b/runtime/onnxruntime/src/paraformer-online.hindex 932785c56..138c77cd7 100644--- a/runtime/onnxruntime/src/paraformer-online.h+++ b/runtime/onnxruntime/src/paraformer-online.h@@ -109,7 +109,7 @@ namespace funasr {void AddOverlapChunk(std::vector<std::vector<float>> &wav_feats, bool input_finished);string ForwardChunk(std::vector<std::vector<float>> &wav_feats, bool input_finished);- string Forward(float* din, int len, bool input_finished, const std::vector<std::vector<float>> &hw_emb={{0.0}});+ string Forward(float* din, int len, bool input_finished, const std::vector<std::vector<float>> &hw_emb={{0.0}}, void* wfst_decoder=nullptr);string Rescoring();// 2passstd::string online_res;