| | |
| | | |
| | | _FUNASRAPI const char* FunASRGetResult(FUNASR_RESULT result,int n_index); |
| | | _FUNASRAPI const char* FunASRGetStamp(FUNASR_RESULT result); |
| | | _FUNASRAPI const char* FunASRGetStampSents(FUNASR_RESULT result); |
| | | _FUNASRAPI const char* FunASRGetTpassResult(FUNASR_RESULT result,int n_index); |
| | | _FUNASRAPI const int FunASRGetRetNumber(FUNASR_RESULT result); |
| | | _FUNASRAPI void FunASRFreeResult(FUNASR_RESULT result); |
| | |
| | | _FUNASRAPI void CTTransformerUninit(FUNASR_HANDLE handle); |
| | | |
| | | //OfflineStream |
| | | _FUNASRAPI FUNASR_HANDLE FunOfflineInit(std::map<std::string, std::string>& model_path, int thread_num); |
| | | _FUNASRAPI FUNASR_HANDLE FunOfflineInit(std::map<std::string, std::string>& model_path, int thread_num, bool use_gpu=false, int batch_size=1); |
| | | _FUNASRAPI void FunOfflineReset(FUNASR_HANDLE handle, FUNASR_DEC_HANDLE dec_handle=nullptr); |
| | | // buffer |
| | | _FUNASRAPI FUNASR_RESULT FunOfflineInferBuffer(FUNASR_HANDLE handle, const char* sz_buf, int n_len, |
| | |
| | | _FUNASRAPI FUNASR_RESULT FunOfflineInfer(FUNASR_HANDLE handle, const char* sz_filename, FUNASR_MODE mode, |
| | | QM_CALLBACK fn_callback, const std::vector<std::vector<float>> &hw_emb, |
| | | int sampling_rate=16000, bool itn=true, FUNASR_DEC_HANDLE dec_handle=nullptr); |
| | | #if !defined(__APPLE__) |
| | | //#if !defined(__APPLE__) |
| | | _FUNASRAPI const std::vector<std::vector<float>> CompileHotwordEmbedding(FUNASR_HANDLE handle, std::string &hotwords, ASR_TYPE mode=ASR_OFFLINE); |
| | | #endif |
| | | //#endif |
| | | |
| | | _FUNASRAPI void FunOfflineUninit(FUNASR_HANDLE handle); |
| | | |
| | |
| | | _FUNASRAPI FUNASR_RESULT FunTpassInferBuffer(FUNASR_HANDLE handle, FUNASR_HANDLE online_handle, const char* sz_buf, |
| | | int n_len, std::vector<std::vector<std::string>> &punc_cache, bool input_finished=true, |
| | | int sampling_rate=16000, std::string wav_format="pcm", ASR_TYPE mode=ASR_TWO_PASS, |
| | | const std::vector<std::vector<float>> &hw_emb={{0.0}}, bool itn=true); |
| | | const std::vector<std::vector<float>> &hw_emb={{0.0}}, bool itn=true, FUNASR_DEC_HANDLE dec_handle=nullptr); |
| | | _FUNASRAPI void FunTpassUninit(FUNASR_HANDLE handle); |
| | | _FUNASRAPI void FunTpassOnlineUninit(FUNASR_HANDLE handle); |
| | | |