#ifndef OFFLINE_STREAM_H #define OFFLINE_STREAM_H #include #include #include #include "model.h" #include "punc-model.h" #include "vad-model.h" #if !defined(__APPLE__) #include "itn-model.h" #endif namespace funasr { class OfflineStream { public: OfflineStream(std::map& model_path, int thread_num); ~OfflineStream(){}; std::unique_ptr vad_handle= nullptr; std::unique_ptr asr_handle= nullptr; std::unique_ptr punc_handle= nullptr; #if !defined(__APPLE__) std::unique_ptr 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; }; OfflineStream *CreateOfflineStream(std::map& model_path, int thread_num=1); } // namespace funasr #endif