mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
19 lines
501 B
C++
19 lines
501 B
C++
|
|
#ifndef MODEL_H
|
|
#define MODEL_H
|
|
|
|
#include <string>
|
|
|
|
class Model {
|
|
public:
|
|
virtual ~Model(){};
|
|
virtual void reset() = 0;
|
|
virtual std::string forward_chunk(float *din, int len, int flag) = 0;
|
|
virtual std::string forward(float *din, int len, int flag) = 0;
|
|
virtual std::string rescoring() = 0;
|
|
virtual std::vector<std::vector<int>> vad_seg(std::vector<float>& pcm_data)=0;
|
|
};
|
|
|
|
Model *create_model(const char *path,int nThread=0,bool quantize=false, bool use_vad=false);
|
|
#endif
|