From e24dbdc496debec225414d4d2c760f5775e64f2a Mon Sep 17 00:00:00 2001
From: 天地 <tiandiweizun@gmail.com>
Date: 星期三, 26 三月 2025 13:44:41 +0800
Subject: [PATCH] 感觉应该从文件读取更合适,因为上面判断了文件存在,且可以读取,如果本身是文本的话,下面也会有逻辑进行处理 (#2452)
---
runtime/onnxruntime/src/audio.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/runtime/onnxruntime/src/audio.cpp b/runtime/onnxruntime/src/audio.cpp
index a5a44ca..22a9ecd 100644
--- a/runtime/onnxruntime/src/audio.cpp
+++ b/runtime/onnxruntime/src/audio.cpp
@@ -1061,8 +1061,9 @@
#ifdef USE_GPU
max_batch = batch_size;
#endif
+ max_batch = std::min(max_batch, (int)frame_queue.size());
- for(int idx=0; idx < std::min(max_batch, (int)frame_queue.size()); idx++){
+ for(int idx=0; idx < max_batch; idx++){
AudioFrame *frame = frame_queue.front();
int length = frame->GetLen();
if(length >= max_sent){
--
Gitblit v1.9.1