Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

fix postprocess for en-bpe

雾聪6161129cceb9
diff --git a/funasr/runtime/onnxruntime/src/vocab.cpp b/funasr/runtime/onnxruntime/src/vocab.cpp
index 95174c728..3f5191100 100644
--- a/funasr/runtime/onnxruntime/src/vocab.cpp
+++ b/funasr/runtime/onnxruntime/src/vocab.cpp
@@ -163,6 +163,13 @@ string Vocab::Vector2StringV2(vector<int> in, std::string language)
}
}
+ if (language == "en-bpe" and combine != ""){
+ if (words.size() != 0){
+ combine = " " + combine;
+ }
+ words.push_back(combine);
+ }
+
stringstream ss;
for (auto it = words.begin(); it != words.end(); it++) {
ss << *it;