From f84e9ffb2c7b2829cf99cf777cf5d278ddb3f8fd Mon Sep 17 00:00:00 2001
From: Yabin Li <wucong.lyb@alibaba-inc.com>
Date: 星期五, 01 九月 2023 10:08:27 +0800
Subject: [PATCH] Update readme_cn.md

---
 funasr/runtime/onnxruntime/src/funasrruntime.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/funasrruntime.cpp b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
index 5dc1618..a10e3ec 100644
--- a/funasr/runtime/onnxruntime/src/funasrruntime.cpp
+++ b/funasr/runtime/onnxruntime/src/funasrruntime.cpp
@@ -318,6 +318,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){
@@ -387,7 +390,7 @@
 			// if (!audio->FfmpegLoad(sz_buf, n_len))
 			// 	return nullptr;
 			LOG(ERROR) <<"Wrong wav_format: " << wav_format ;
-			exit(-1);
+			return nullptr;
 		}
 
 		funasr::FUNASR_RECOG_RESULT* p_result = new funasr::FUNASR_RECOG_RESULT;

--
Gitblit v1.9.1