From 40eefbe376bd2e846bd9c451636f4e42ba1bf8bf Mon Sep 17 00:00:00 2001
From: zhuzizyf <42790740+zhuzizyf@users.noreply.github.com>
Date: 星期三, 12 四月 2023 17:18:19 +0800
Subject: [PATCH] Merge pull request #1 from zhuzizyf/fix-dataset-bug
---
funasr/runtime/onnxruntime/src/paraformer_onnx.h | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/paraformer_onnx.h b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
index ebbbb51..e763be2 100644
--- a/funasr/runtime/onnxruntime/src/paraformer_onnx.h
+++ b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
@@ -4,22 +4,24 @@
#ifndef PARAFORMER_MODELIMP_H
#define PARAFORMER_MODELIMP_H
-
-
-
-
namespace paraformer {
class ModelImp : public Model {
private:
- FeatureExtract* fe;
+ int fft_size=512;
+ float *fft_input;
+ fftwf_complex *fft_out;
+ fftwf_plan plan;
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);
#ifdef _WIN_X86
@@ -35,11 +37,9 @@
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);
+ ModelImp(const char* path, int nNumThread=0, bool quantize=false);
~ModelImp();
void reset();
string forward_chunk(float* din, int len, int flag);
--
Gitblit v1.9.1