ex
Fork of mbed-os-example-mbed5-blinky by
dcs-sdk-java-master/app/src/main/cpp/Interface.h@45:2aa9f933c8d2, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:34:48 2017 +0800
- Revision:
- 45:2aa9f933c8d2
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 45:2aa9f933c8d2 | 1 | |
| TMBOY | 45:2aa9f933c8d2 | 2 | #ifndef _EASR_INTERFACE_ |
| TMBOY | 45:2aa9f933c8d2 | 3 | #define _EASR_INTERFACE_ |
| TMBOY | 45:2aa9f933c8d2 | 4 | |
| TMBOY | 45:2aa9f933c8d2 | 5 | int GetEngineVersion(); |
| TMBOY | 45:2aa9f933c8d2 | 6 | int SetLogLevel(int level); |
| TMBOY | 45:2aa9f933c8d2 | 7 | int SetTimeLogFile(const char* fn); |
| TMBOY | 45:2aa9f933c8d2 | 8 | int SetSampleRateMode(int mode); |
| TMBOY | 45:2aa9f933c8d2 | 9 | bool ExistFile(const char* file); |
| TMBOY | 45:2aa9f933c8d2 | 10 | int GetDataDate(const char* fn); |
| TMBOY | 45:2aa9f933c8d2 | 11 | int GetResLine(const char* fn); |
| TMBOY | 45:2aa9f933c8d2 | 12 | int GetResVersion(const char* fn); |
| TMBOY | 45:2aa9f933c8d2 | 13 | bool CheckDataMD5(const char* fn); |
| TMBOY | 45:2aa9f933c8d2 | 14 | int DisableSSE4(); |
| TMBOY | 45:2aa9f933c8d2 | 15 | |
| TMBOY | 45:2aa9f933c8d2 | 16 | int ClearRes(); |
| TMBOY | 45:2aa9f933c8d2 | 17 | int Free(); |
| TMBOY | 45:2aa9f933c8d2 | 18 | int Initial(); |
| TMBOY | 45:2aa9f933c8d2 | 19 | int Initial(const char* dictFile, const char* userFile, const char* mmfFile, const char* hmmMapFile, |
| TMBOY | 45:2aa9f933c8d2 | 20 | short acoustic_model_mode=1,bool fastMode=false); |
| TMBOY | 45:2aa9f933c8d2 | 21 | int BuildNet(int netTreeID,const char* synFile); |
| TMBOY | 45:2aa9f933c8d2 | 22 | int WriteWdNonPron(const char* outFile); |
| TMBOY | 45:2aa9f933c8d2 | 23 | |
| TMBOY | 45:2aa9f933c8d2 | 24 | int BuildSlot(char* buffer,long len); |
| TMBOY | 45:2aa9f933c8d2 | 25 | int ReadSlot(const char* slotFile); |
| TMBOY | 45:2aa9f933c8d2 | 26 | int ReadSlotLink(const char* slotLinkFile); |
| TMBOY | 45:2aa9f933c8d2 | 27 | int ReadLM(const char* lmFn,const char* slotName,bool needBuildSlot); |
| TMBOY | 45:2aa9f933c8d2 | 28 | int LoadRes(const char* lmFn,const char* lmSlotName,const char* slotFile,const char* slotLinkFile); |
| TMBOY | 45:2aa9f933c8d2 | 29 | |
| TMBOY | 45:2aa9f933c8d2 | 30 | int SetVADEndCut(int id,bool vadEdForCut); |
| TMBOY | 45:2aa9f933c8d2 | 31 | int InitialDecoder(int id,int vadID,int nBeam,double prunThres); |
| TMBOY | 45:2aa9f933c8d2 | 32 | int ResetDecoder(int id); |
| TMBOY | 45:2aa9f933c8d2 | 33 | int SetCurrNetTreeID(int id,int treeID,int mode=0); |
| TMBOY | 45:2aa9f933c8d2 | 34 | int Fep(int id,short* data, int dataLen, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 35 | int Rec(int id, char** senArr, int expectNum); |
| TMBOY | 45:2aa9f933c8d2 | 36 | char* GetImmeSentence(int id,int& frame); |
| TMBOY | 45:2aa9f933c8d2 | 37 | |
| TMBOY | 45:2aa9f933c8d2 | 38 | char* DecodeAlways(int id,short* data, int dataLen, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 39 | |
| TMBOY | 45:2aa9f933c8d2 | 40 | int InitialMem(); |
| TMBOY | 45:2aa9f933c8d2 | 41 | int InitialVAD(int id,float max_speech_len,float max_speech_pause_len); |
| TMBOY | 45:2aa9f933c8d2 | 42 | int ResetVAD(int id); |
| TMBOY | 45:2aa9f933c8d2 | 43 | int VADDetect(int id,short* data, int dataLen, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 44 | int GetVadSt(int id); |
| TMBOY | 45:2aa9f933c8d2 | 45 | int GetVadEd(int id); |
| TMBOY | 45:2aa9f933c8d2 | 46 | long int get_dect_end_point_time(int id); |
| TMBOY | 45:2aa9f933c8d2 | 47 | |
| TMBOY | 45:2aa9f933c8d2 | 48 | int KWSSetParam(int type,float value); |
| TMBOY | 45:2aa9f933c8d2 | 49 | int KWSInitial(const char* kwdSynStr,const char* sFile,const char* resDir,int mode = 0); |
| TMBOY | 45:2aa9f933c8d2 | 50 | int KWSReset(int* sceneArr,int n); |
| TMBOY | 45:2aa9f933c8d2 | 51 | int KWSDecode(short* data, int dataLen, char** kwdArr, int expectNum, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 52 | int KWSDecode(short* data, int dataLen, char* outJsonStr, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 53 | int KWSFree(); |
| TMBOY | 45:2aa9f933c8d2 | 54 | |
| TMBOY | 45:2aa9f933c8d2 | 55 | int AudioSegReset(); |
| TMBOY | 45:2aa9f933c8d2 | 56 | int AudioSegFree(); |
| TMBOY | 45:2aa9f933c8d2 | 57 | int AudioSegInitial(const char* sFile,int mode=0); |
| TMBOY | 45:2aa9f933c8d2 | 58 | int AudioSegDetect(short* data, int dataLen, bool bEd, int& spSt, int& spEd); |
| TMBOY | 45:2aa9f933c8d2 | 59 | int AudioSegDetect(short* data, int dataLen, bool bEd, int& spSt, int& spEd, int *pauseEd); |
| TMBOY | 45:2aa9f933c8d2 | 60 | float AudioSeggetSilConfidence(int contextLen); |
| TMBOY | 45:2aa9f933c8d2 | 61 | int setParam(int function, int type, float value); //function: 1 = audioSeg |
| TMBOY | 45:2aa9f933c8d2 | 62 | int AudioSegGetDelayFrameNum(); |
| TMBOY | 45:2aa9f933c8d2 | 63 | |
| TMBOY | 45:2aa9f933c8d2 | 64 | int WakeUpInitial(const char* wakeUpWd,const char* sFile,int mode=0); |
| TMBOY | 45:2aa9f933c8d2 | 65 | int WakeUpReset(); |
| TMBOY | 45:2aa9f933c8d2 | 66 | int WakeUpDecode(short* data, int dataLen, char** senArr, int expectNum, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 67 | int WakeUpDecode(short* data, int dataLen, char** senArr, int expectNum, int &wakeword_frame_len, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 68 | int WakeUpDecode(short* data, int dataLen, char** senArr, int expectNum, int &wakeword_frame_len, |
| TMBOY | 45:2aa9f933c8d2 | 69 | bool &is_confidence, int &voice_offset, bool bEd); |
| TMBOY | 45:2aa9f933c8d2 | 70 | int WakeUpFree(); |
| TMBOY | 45:2aa9f933c8d2 | 71 | int WakeUpSetEnvironment(int status);//0 is quiet,else is noise |
| TMBOY | 45:2aa9f933c8d2 | 72 | |
| TMBOY | 45:2aa9f933c8d2 | 73 | int AECInit(); |
| TMBOY | 45:2aa9f933c8d2 | 74 | int AECReset(); |
| TMBOY | 45:2aa9f933c8d2 | 75 | short* AECProcess(short* data_in,short* wav_ref,long len_in); |
| TMBOY | 45:2aa9f933c8d2 | 76 | int AECExit(); |
| TMBOY | 45:2aa9f933c8d2 | 77 | |
| TMBOY | 45:2aa9f933c8d2 | 78 | int GetPyED(const char* str1,const char* str2); |
| TMBOY | 45:2aa9f933c8d2 | 79 | int GetStateED(const char* str1,const char* str2); |
| TMBOY | 45:2aa9f933c8d2 | 80 | |
| TMBOY | 45:2aa9f933c8d2 | 81 | extern char* ChnNameSegPreProcess(const char* aNameArr,const char* aResFileName); |
| TMBOY | 45:2aa9f933c8d2 | 82 | extern char* EngNamePronPreProcess(const char* aNameArr); |
| TMBOY | 45:2aa9f933c8d2 | 83 | |
| TMBOY | 45:2aa9f933c8d2 | 84 | int SetLicenseFlag(bool lic_flag); |
| TMBOY | 45:2aa9f933c8d2 | 85 | bool GetLicenseFlag(); |
| TMBOY | 45:2aa9f933c8d2 | 86 | |
| TMBOY | 45:2aa9f933c8d2 | 87 | #ifdef _ANDROID_ |
| TMBOY | 45:2aa9f933c8d2 | 88 | #include <jni.h> |
| TMBOY | 45:2aa9f933c8d2 | 89 | int GetLicense(JNIEnv *env, jclass obj,jobject context,jstring appCode,jstring cuid,jstring stat,jstring license_file); |
| TMBOY | 45:2aa9f933c8d2 | 90 | int VerifyLicense(JNIEnv *env,jobject context,jstring appCode,jstring cuid,jbyteArray license,jint len,jbyteArray appIDSeq,jstring logDir); |
| TMBOY | 45:2aa9f933c8d2 | 91 | #else |
| TMBOY | 45:2aa9f933c8d2 | 92 | #ifdef _IOS_ |
| TMBOY | 45:2aa9f933c8d2 | 93 | int GetLicense(const char* appCode,const char* stat,const char* license_file); |
| TMBOY | 45:2aa9f933c8d2 | 94 | int VerifyLicense(const char* appCode,const char* license,int len,unsigned int& appID,const char* logDir); |
| TMBOY | 45:2aa9f933c8d2 | 95 | #else //x86 |
| TMBOY | 45:2aa9f933c8d2 | 96 | int GetLicense(const char* appName,const char* appCode,const char* stat,const char* license_file); |
| TMBOY | 45:2aa9f933c8d2 | 97 | int VerifyLicense(const char* appName,const char* appCode,const char* license,int len,unsigned int& appID,const char* logDir); |
| TMBOY | 45:2aa9f933c8d2 | 98 | #endif |
| TMBOY | 45:2aa9f933c8d2 | 99 | #endif |
| TMBOY | 45:2aa9f933c8d2 | 100 | int OpenPVUpload(); |
| TMBOY | 45:2aa9f933c8d2 | 101 | int ClosePVUpload(); |
| TMBOY | 45:2aa9f933c8d2 | 102 | int GetTestAuthorize(); |
| TMBOY | 45:2aa9f933c8d2 | 103 | int GetLongAuthorize(); |
| TMBOY | 45:2aa9f933c8d2 | 104 | bool GetAuthorize(); |
| TMBOY | 45:2aa9f933c8d2 | 105 | |
| TMBOY | 45:2aa9f933c8d2 | 106 | |
| TMBOY | 45:2aa9f933c8d2 | 107 | #endif |
