From 8e449d676d4f06ba3de02c451c3b4fa3433a3792 Mon Sep 17 00:00:00 2001
From: lyblsgo <lyblsgo@163.com>
Date: 星期二, 11 四月 2023 10:35:29 +0800
Subject: [PATCH] debug onnxruntime multithread bugs

---
 funasr/runtime/onnxruntime/src/paraformer_onnx.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/funasr/runtime/onnxruntime/src/paraformer_onnx.h b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
index db00842..5d3b0fe 100644
--- a/funasr/runtime/onnxruntime/src/paraformer_onnx.h
+++ b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
@@ -8,12 +8,16 @@
 
     class ModelImp : public Model {
     private:
-        FeatureExtract* fe;
+        //FeatureExtract* fe;
 
         Vocab* vocab;
+        vector<float> means_list;
+        vector<float> vars_list;
+        const float scale = 22.6274169979695;
 
         void apply_lfr(Tensor<float>*& din);
         void apply_cmvn(Tensor<float>* din);
+        void load_cmvn(const char *filename);
 
         string greedy_search( float* in, int nLen);
 
@@ -30,8 +34,6 @@
         vector<string> m_strInputNames, m_strOutputNames;
         vector<const char*> m_szInputNames;
         vector<const char*> m_szOutputNames;
-        //string m_strInputName, m_strInputNameLen;
-        //string m_strOutputName, m_strOutputNameLen;
 
     public:
         ModelImp(const char* path, int nNumThread=0, bool quantize=false);

--
Gitblit v1.9.1