FunASR/runtime/onnxruntime/include/punc-model.h
Yabin Li 00cfc36b9a
c++ runtime adapt to 1.0 (#1724)
* adapt vad runtime to 1.0

* add json

* change yml name

* add func LoadVocabFromJson

* add token file for InitAsr

* add token path for OfflineStream

* add funcOpenYaml

* add token file for InitPunc

* add token file for stream

* update punc-model

* update funasr-wss-server
2024-05-13 16:52:41 +08:00

22 lines
719 B
C++

#ifndef PUNC_MODEL_H
#define PUNC_MODEL_H
#include <string>
#include <map>
#include <vector>
#include "funasrruntime.h"
namespace funasr {
class PuncModel {
public:
virtual ~PuncModel(){};
virtual void InitPunc(const std::string &punc_model, const std::string &punc_config, const std::string &token_file, int thread_num)=0;
virtual std::string AddPunc(const char* sz_input, std::string language="zh-cn"){return "";};
virtual std::string AddPunc(const char* sz_input, std::vector<std::string>& arr_cache, std::string language="zh-cn"){return "";};
};
PuncModel *CreatePuncModel(std::map<std::string, std::string>& model_path, int thread_num, PUNC_TYPE type=PUNC_OFFLINE);
} // namespace funasr
#endif