From dc8a0445d5460af16e9926a492a85da592f224bb Mon Sep 17 00:00:00 2001
From: lyblsgo <lyblsgo@163.com>
Date: 星期二, 11 四月 2023 20:00:13 +0800
Subject: [PATCH] fix bug: msg.c_str
---
funasr/runtime/onnxruntime/src/paraformer_onnx.h | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/paraformer_onnx.h b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
index ebbbb51..99b6856 100644
--- a/funasr/runtime/onnxruntime/src/paraformer_onnx.h
+++ b/funasr/runtime/onnxruntime/src/paraformer_onnx.h
@@ -4,22 +4,23 @@
#ifndef PARAFORMER_MODELIMP_H
#define PARAFORMER_MODELIMP_H
-
-
-
-
namespace paraformer {
class ModelImp : public Model {
private:
- FeatureExtract* fe;
+ 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 +36,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