志浩
2023-04-07 4137f5cf26e7c4b40853959cd2574edfde03aa60
funasr/runtime/onnxruntime/src/paraformer_onnx.h
@@ -4,10 +4,6 @@
#ifndef PARAFORMER_MODELIMP_H
#define PARAFORMER_MODELIMP_H
namespace paraformer {
    class ModelImp : public Model {
@@ -15,11 +11,14 @@
        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);
#ifdef _WIN_X86
@@ -39,7 +38,7 @@
        //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);