From a58c3d4593892459614aabda689fb61af74e20fe Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期五, 29 三月 2024 16:47:27 +0800
Subject: [PATCH] add batch for paraformer
---
runtime/onnxruntime/src/funasrruntime.cpp | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/runtime/onnxruntime/src/funasrruntime.cpp b/runtime/onnxruntime/src/funasrruntime.cpp
index 5e2aa93..711eac7 100644
--- a/runtime/onnxruntime/src/funasrruntime.cpp
+++ b/runtime/onnxruntime/src/funasrruntime.cpp
@@ -252,8 +252,6 @@
int len;
int flag = 0;
- int n_step = 0;
- int n_total = audio.GetQueueSize();
float start_time = 0.0;
std::string cur_stamp = "[";
std::string lang = (offline_stream->asr_handle)->GetLang();
@@ -281,9 +279,6 @@
cur_stamp += "["+std::to_string((int)(1000*begin))+","+std::to_string((int)(1000*end))+"],";
}
}
- n_step++;
- if (fn_callback)
- fn_callback(n_step, n_total);
}
if(cur_stamp != "["){
cur_stamp.erase(cur_stamp.length() - 1);
@@ -797,7 +792,7 @@
return mm;
}
#ifdef USE_GPU
- auto paraformer_torch = dynamic_cast<funasr::ParaformerTorch*>(offline_stream->asr_handle.get());
+ auto paraformer_torch = dynamic_cast<funasr::ParaformerTorch*>(tpass_stream->asr_handle.get());
if(paraformer_torch !=nullptr){
if (paraformer_torch->lm_){
mm = new funasr::WfstDecoder(paraformer_torch->lm_.get(),
--
Gitblit v1.9.1