hnluo
2023-09-21 41c64e4729ca359f7212534055239c8289b5e2f4
funasr/runtime/onnxruntime/include/tpass-stream.h
@@ -7,6 +7,9 @@
#include "model.h"
#include "punc-model.h"
#include "vad-model.h"
#if !defined(__APPLE__)
#include "itn-model.h"
#endif
namespace funasr {
class TpassStream {
@@ -14,16 +17,20 @@
    TpassStream(std::map<std::string, std::string>& model_path, int thread_num);
    ~TpassStream(){};
    // std::unique_ptr<VadModel> vad_handle = nullptr;
    std::unique_ptr<VadModel> vad_handle = nullptr;
    std::unique_ptr<Model> asr_handle = nullptr;
    std::unique_ptr<PuncModel> punc_online_handle = nullptr;
#if !defined(__APPLE__)
    std::unique_ptr<ITNModel> itn_handle = nullptr;
#endif
    bool UseVad(){return use_vad;};
    bool UsePunc(){return use_punc;}; 
    bool UseITN(){return use_itn;};
    
  private:
    bool use_vad=false;
    bool use_punc=false;
    bool use_itn=false;
};
TpassStream *CreateTpassStream(std::map<std::string, std::string>& model_path, int thread_num=1);