| | |
| | | #include <string> |
| | | #include <map> |
| | | #include "funasrruntime.h" |
| | | #include "vocab.h" |
| | | #include "phone-set.h" |
| | | #include "fst/fstlib.h" |
| | | #include "fst/symbol-table.h" |
| | | namespace funasr { |
| | | class Model { |
| | | public: |
| | |
| | | virtual void InitSegDict(const std::string &seg_dict_model){}; |
| | | virtual std::vector<std::vector<float>> CompileHotwordEmbedding(std::string &hotwords){return std::vector<std::vector<float>>();}; |
| | | virtual std::string GetLang(){return "";}; |
| | | virtual int GetAsrSampleRate() = 0; |
| | | virtual Vocab* GetVocab() {return nullptr;}; |
| | | virtual Vocab* GetLmVocab() {return nullptr;}; |
| | | virtual PhoneSet* GetPhoneSet() {return nullptr;}; |
| | | }; |
| | | |
| | | Model *CreateModel(std::map<std::string, std::string>& model_path, int thread_num=1, ASR_TYPE type=ASR_OFFLINE); |