From aa72e0ca5f7541d5e37877a91816f03883809ad3 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期三, 25 九月 2024 23:44:42 +0800
Subject: [PATCH] add sensevoice-small

---
 runtime/onnxruntime/src/fsmn-vad.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/runtime/onnxruntime/src/fsmn-vad.h b/runtime/onnxruntime/src/fsmn-vad.h
index adceb1f..5443a3b 100644
--- a/runtime/onnxruntime/src/fsmn-vad.h
+++ b/runtime/onnxruntime/src/fsmn-vad.h
@@ -28,10 +28,13 @@
         std::vector<std::vector<float>> *in_cache,
         bool is_final);
     void Reset();
+
+    int GetVadSampleRate() { return vad_sample_rate_; };
     
     std::shared_ptr<Ort::Session> vad_session_ = nullptr;
     Ort::Env env_;
     Ort::SessionOptions session_options_;
+    Ort::AllocatorWithDefaultOptions vad_allocator;
     std::vector<const char *> vad_in_names_;
     std::vector<const char *> vad_out_names_;
     std::vector<std::vector<float>> in_cache_;
@@ -54,7 +57,8 @@
 
     static void GetInputOutputInfo(
             const std::shared_ptr<Ort::Session> &session,
-            std::vector<const char *> *in_names, std::vector<const char *> *out_names);
+            std::vector<const char *> *in_names, std::vector<const char *> *out_names,
+            Ort::AllocatorWithDefaultOptions *allocator);
 
     void FbankKaldi(float sample_rate, std::vector<std::vector<float>> &vad_feats,
                     std::vector<float> &waves);

--
Gitblit v1.9.1