| | |
| | | #ifndef PARAFORMER_MODELIMP_H |
| | | #define PARAFORMER_MODELIMP_H |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | namespace paraformer { |
| | | |
| | | class ModelImp : public Model { |
| | |
| | | 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 |
| | |
| | | //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); |