From fb06c50b11cf4e5e3a55fc62a60f595f2549ff76 Mon Sep 17 00:00:00 2001
From: veelion <veelion@gmail.com>
Date: 星期一, 27 三月 2023 09:01:48 +0800
Subject: [PATCH] add example of grpc client
---
funasr/runtime/onnxruntime/src/Audio.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/Audio.cpp b/funasr/runtime/onnxruntime/src/Audio.cpp
index 43dfb6b..53bf9d0 100644
--- a/funasr/runtime/onnxruntime/src/Audio.cpp
+++ b/funasr/runtime/onnxruntime/src/Audio.cpp
@@ -237,7 +237,7 @@
size_t nOffset = 0;
-#define WAV_HEADER_SIZE 44
+
speech_len = nBufLen / 2;
speech_align_len = (int)(ceil((float)speech_len / align_size) * align_size);
@@ -263,7 +263,8 @@
speech_data[i] = (float)speech_buff[i] / scale;
}
-
+ AudioFrame* frame = new AudioFrame(speech_len);
+ frame_queue.push(frame);
return true;
}
--
Gitblit v1.9.1