From e3e6d392380c8a58014fefa498c34f85d07feac8 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期三, 23 八月 2023 19:44:19 +0800
Subject: [PATCH] update msg_vec
---
funasr/runtime/onnxruntime/src/funasrruntime.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/funasrruntime.cpp b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
index ce31d17..5dc1618 100644
--- a/funasr/runtime/onnxruntime/src/funasrruntime.cpp
+++ b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
@@ -252,6 +252,9 @@
while (audio.Fetch(buff, len, flag, start_time) > 0) {
string msg = (offline_stream->asr_handle)->Forward(buff, len, true, hw_emb);
std::vector<std::string> msg_vec = funasr::split(msg, '|');
+ if(msg_vec.size()==0){
+ continue;
+ }
p_result->msg += msg_vec[0];
//timestamp
if(msg_vec.size() > 1){
--
Gitblit v1.9.1