#ifndef LVCSR_API_H #define LVCSR_API_H #ifdef WIN32 #define LVCSR_LIBRARY_API __declspec(dllexport) #define snprintf sprintf_s #else #define LVCSR_LIBRARY_API #endif #define MAX_CHANNEL 5000 #define MAX_NAME_SIZE 128 /** module */ #define MODULE_USE_ENGINE_GENERAL 0X0001 // 1 #define MODULE_USE_ENGINE_SPACING 0X0002 // 2 #define MODULE_USE_PLUGIN_KWD 0x0010 // 16 #define MODULE_USE_PLUGIN_ADDR 0x0020 // 32 #define MODULE_USE_PLUGIN_PHONICS 0x0030 // 48 #define MODULE_USE_PLUGIN_ITN 0x0040 // 64 #define MODULE_USE_ENGINE_GENERAL_PLUGIN_NONE 0X0001 // 1 #define MODULE_USE_ENGINE_GENERAL_PLUGIN_KWD 0X0011 // 17 #define MODULE_USE_ENGINE_GENERAL_PLUGIN_ADDR 0X0021 // 33 #define MODULE_USE_ENGINE_GENERAL_PLUGIN_PHONICS 0X0031 // 49 #define MODULE_USE_ENGINE_GENERAL_PLUGIN_ITN 0X0041 // 65 #define MODULE_USE_ENGINE_SPACING_PLUGIN_NONE 0X0002 // 2 #define MODULE_USE_ENGINE_SPACING_PLUGIN_KWD 0X0012 // 18 #define MODULE_USE_ENGINE_SPACING_PLUGIN_ADDR 0X0022 // 34 #define MODULE_USE_ENGINE_SPACING_PLUGIN_PHONICS 0X0032 // 50 #define MODULE_USE_ENGINE_SPACING_PLUGIN_ITN 0X0042 // 66 typedef enum _LVCSR_RESULT { LVCSR_SUCCESS = 0, // ¼º°ø LVCSR_FAIL = -1, // ½ÇÆÐ LVCSR_TIMEOUT = -2, // ½Ã°£ÃÊ°ú } LVCSR_RESULT; typedef enum _LVCSR_EPD_INFO { RECEIV_OK = 0, // Àü¼Û ¼º°ø - º¸³»ÁØ ¾ÐÃàÀ½¼ºÀ» ¹Þ°í °è¼Ó º¸³»¶ó´Â ¸Þ½ÃÁö RECEIV_OK_SPEECH = 1, // Start Point Detect - º¸³»ÁØ ¾ÐÃàÀ½¼ºÀ» ¹Þ°í °è¼Ó º¸³»¶ó´Â ¸Þ½ÃÁö À̸ç "À½¼ºÀ̶ó°í ÆÇ´ÜµÈ ½ÃÁ¡ºÎÅÍ ³ª¿Â´Ù. EPD_FOUND = 2, // À½¼ºÀÇ ³¡ °ËÃâ - À½¼ºÀÎ½Ä ¼­¹ö¿¡¼­ À½¼º ³¡Á¡À» °ËÃâÇÏ¿© ³ìÀ½ Á¾·áÇ϶ó´Â ¸Þ½ÃÁö START_TIME_OVER = 3, // ùÀ½ °ËÃâ ½ÇÆÐ - Á¤ÇØÁø ½Ã°£µ¿¾È À½¼ºÀÌ ¾ø¾î ùÀ½ °ËÃâ ½ÇÆп¡ ´ëÇÑ ¸Þ½ÃÁö DURATION_TIME_OVER = 4, // ³¡Á¡ °ËÃâ ½ÇÆÐ - Á¤ÇØÁø ½Ã°£µ¿¾È ³¡Á¡ °ËÃâ ½ÇÆп¡ ´ëÇÑ ¸Þ½ÃÁö SECTION_FOUND = 5, // ±¸°£ À½¼º°ËÃâ ¿Ï·á(¿£Áø EPD È°¼ºÈ­½Ã ¸®ÅÏ). °è¼Ó µ¥ÀÌÅÍ Àü¼Û ¿äû. EPD_ERROR = 9, // EPD ¿À·ù ¹ß»ý } LVCSR_EPD_INFO; typedef enum _LVCSR_TYPE_CODEC { CODEC_RAW_8K = 0, // 8KHz ¿Àµð¿À Æ÷¸Ë(¹Ì¾ÐÃà) CODEC_RAW_16K = 1, // 16KHz ¿Àµð¿À Æ÷¸Ë(¹Ì¾ÐÃà) - 16K ¿£ÁøÀÎ °æ¿ì »ç¿ë °¡´É CODEC_ULAW_8K = 2, // G.711 ÄÚµ¦À» ÀÌ¿ëÇÑ ¾ÐÃà ¹æ¹ýÀ¸·Î À¯·´¿¡¼­ Ç¥ÁØ Ã¤Åà »ç¿ë CODEC_ALAW_8K = 3, // G.711 ÄÚµ¦À» ÀÌ¿ëÇÑ ¾ÐÃà ¹æ¹ýÀ¸·Î ºÏ¾Æ¸Þ¸®Ä« ¹× ÀϺ» µî¿¡¼­ Ç¥ÁØ Ã¤Åà »ç¿ë CODEC_SPEEX_16K = 4, // À½¼ºÀ» À§ÇØ °³¹ßµÈ ¹«Æ¯Çã ¿Àµð¿À ¾ÐÃà Æ÷¸Ë } LVCSR_TYPE_CODEC; typedef enum _LVCSR_SET_CHAR { CHAR_SET_EUCKR = 0, // EUC-KR CHAR_SET_UTF8 = 1, // UTF-8 } LVCSR_SET_CHARSET; typedef enum _LVCSR_USED_EPD { EPD_USED_OFF = 0, // EPD ¸ðµâ ¹Ì»ç¿ë SERVER_EPD_USED_ON = 1, // SERVER EPD ON(LVCSR_RECOG_MID_RESULT »ó¼¼°á°ú ¹Ì Á¦°ø) ENGINE_EPD_USED_WITH_DETECTOR_MID_RESULT = 2, // ENGINE EPD ON(LVCSR_RECOG_MID_RESULT »ó¼¼°á°ú Á¦°ø - ENGINE EPD °ËÃâ) ENGINE_EPD_USED_WITH_CONTINUE_MID_RESULT = 3, // ENGINE EPD ON(LVCSR_RECOG_MID_RESULT »ó¼¼°á°ú Á¦°ø - ENGINE EPD ¹«°ü<°è¼Ó>) } LVCSR_USED_EPD; typedef enum _LVCSR_USED_SCORE { SCORE_USED_OFF = 0, // Á¡¼ö ¹Ì»ç¿ë SCORE_USED_ON = 1, // Á¡¼ö »ç¿ë } LVCSR_USED_SCORE; typedef enum _LVCSR_USED_WORD { WORD_USED_OFF = 0, // À½Àý Àνķü »ç¿ë(´Ü¾î Àνķü ¹Ì»ç¿ë) WORD_USED_ON = 1, // ´Ü¾î Àνķü »ç¿ë } LVCSR_USED_WORD; typedef enum _LVCSR_TYPE_ADDR { TYPE_NONE = 0, // °ª ¾øÀ½ JIBUN_ADDR = 1, // Áö¹øÁÖ¼Ò(¹ýÁ¤µ¿/ÇàÁ¤µ¿ ÁÖ¼Òü°èÀ̸ç Áö¹ø ¾ø´Â °æ¿ì ¶Ç´Â POI) JIBUN_ADDR_KEY = 2, // Áö¹øÁÖ¼Ò(¹ýÁ¤µ¿/ÇàÁ¤µ¿ ÁÖ¼Òü°èÀ̸ç Áö¹øÀÌ ÀÖ´Â °æ¿ì) ROAD_ADDR = 3, // µµ·Î¸íÁÖ¼Ò(°Ç¹°¹øÈ£°¡ ¾ø´Â °æ¿ì ¶Ç´Â POI) ROAD_ADDR_KEY = 4, // µµ·Î¸íÁÖ¼Ò(°Ç¹°¹øÈ£°¡ ÀÖ´Â °æ¿ì) } LVCSR_TYPE_ADDR; typedef enum _LVCSR_TYPE_CHANNEL { ASR_STAT_IDLE = 0, // À¯ÈÞ»óÅ ASR_STAT_WAIT = 1, // ´ë±â»óÅ ASR_STAT_WORK = 2, // ÀνĻóÅ ASR_STAT_FAIL = 3, // ¿À·ù»óÅ } LVCSR_TYPE_CHANNEL; typedef enum _LVCSR_USED_SSL { SSL_USED_OFF = 0, // SSL ¹Ì»ç¿ë SSL_USED_ON = 1, // SSL »ç¿ë } LVCSR_USED_SSL; typedef enum _LVCSR_SSL_RESULT { SSL_SUCCESS = 1, // SSL ¼º°ø SSL_FAIL = -1, // SSL ½ÇÆÐ SSL_NOT_FOUND_CRT = -2, // ÀÎÁõ¼­ ½ÇÆÐ } LVCSR_SSL_RESULT; typedef enum _LVCSR_USED_CRT_CHECK { CRT_CHECK_OFF = 0, // ÀÎÁõ¼­ ¹Ìüũ CRT_CHECK_ON = 1, // ÀÎÁõ¼­ üũ } LVCSR_USED_CRT_CHECK; typedef enum _LVCSR_RESULT_CODE { STT_WARNING = -1, // STT ¸ðµâ °æ°í STT_FAILED = 0, // STT ¸ðµâ ½ÇÆÐ STT_SUCCESS = 1, // STT ¸ðµâ ¼º°ø } LVCSR_RESULT_CODE; typedef enum _LVCSR_RESULT_TYPE { STT_TYPE = 0, // STT ¸ðµâ STT ŸÀÔ PHONICS_TYPE = 1, // STT ¸ðµâ PHONICS ŸÀÔ } LVCSR_RESULT_TYPE; typedef struct _LVCSR_DATA_PHONEME { long long nPhTokenLen; // À½¼Ò ÀÎ½Ä °á°ú ±æÀÌ char* pPhToken; // À½¼Ò ÀÎ½Ä °á°ú long long nDuration; // Àç»ý ½ÃÀÛ Á¤º¸( ms ) double dScore; // À½¼Ò Á¡¼ö } LVCSR_DATA_PHONEME; typedef struct _LVCSR_DATA_RESULT { long long nTokenLen; // ´Ü¾î °á°ú ±æÀÌ char* pTokenStr; // ´Ü¾î °á°ú long long nStart; // ±¸°£ ½ÃÀÛ Á¤º¸( ms ) long long nEnd; // ±¸°£ Á¾·á Á¤º¸( ms ) double dScore; // ´Ü¾î Á¡¼ö long long nResultPhCnt; // À½¼Ò Á¤º¸ ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_PHONEME* pResultPhoneme; // À½¼Ò Á¤º¸ ±¸Á¶Ã¼ } LVCSR_DATA_RESULT; typedef struct _LVCSR_DATA_EPD { long long nStart; // EPD ½ÃÀÛ Á¤º¸( ms ) long long nEnd; // EPD Á¾·á Á¤º¸( ms ) } LVCSR_DATA_EPD; typedef struct _LVCSR_DATA_CHAR_TIME { long long nCharSec; // ¹ß¼º ±¸ºÐ ½Ã°£( Sec ) } LVCSR_DATA_CHAR_TIME; typedef struct _LVCSR_DATA_WAVE_FORM { long long nWaveFormSize; // ÆÄÇü Å©±â Á¤º¸ } LVCSR_DATA_WAVE_FORM; typedef struct _LVCSR_DATA_CHAR_INFO { long long nCharacterSecSum; // ÃÊ´ç ÀÎ½Ä °á°ú ±ÛÀÚ °³¼ö double dCharacterPerSec; // ÃÊ´ç ´Ü¾î ¹ß¼º ¼Óµµ } LVCSR_DATA_CHAR_INFO; typedef struct _LVCSR_RECOG_ADD_INFO { long long nCharacterSum; // ÀÎ½Ä °á°ú ±ÛÀÚ °³¼ö long long nEpsTime; // ¹¬À½ ÃÑ ½Ã°£ long long nNoiseTime; // ¹ß¼º ÃÑ ½Ã°£ long long nTotalTime; // Àüü ½Ã°£ double dCharacterTotPerSec; // ÃÊ´ç ¹ß¼º ¼Óµµ long long nCount; // ÆÄÇü ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_WAVE_FORM* pDataWaveForm; // ÆÄÇü »ó¼¼³»¿ë ±¸Á¶Ã¼ long long nCharCount; // ÃÊ´ç ¹ß¼º ¼Óµµ ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_CHAR_INFO* pDataCharInfo; // ÃÊ´ç ¹ß¼º ¼Óµµ »ó¼¼³»¿ë ±¸Á¶Ã¼ } LVCSR_RECOG_ADD_INFO; typedef struct _LVCSR_DATA_NBEST_RESULT { long long nResultLen; // Àνİá°ú ±æÀÌ char* pResult; // ÀÎ½Ä °á°ú double dConfidScore; // ÀÎ½Ä È®·ü°ª long long nCount; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_RESULT* pDataResult; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ } LVCSR_DATA_NBEST_RESULT; typedef struct _LVCSR_RECOG_NBEST_RESULT { long long nCount; // Àνİá°ú NBEST ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_NBEST_RESULT* pDataNbestResult; // Àνİá°ú NBEST ±¸Á¶Ã¼ LVCSR_DATA_EPD* pResultEPD; // EPD ±¸Á¶Ã¼ } LVCSR_RECOG_NBEST_RESULT; // PHONICS Ãß°¡ typedef struct _LVCSR_DATA_PHONICS { long long nPhonicsLen; // Phonics ÅؽºÆ® ±æÀÌ char* pPhonicsStr; // Phonics ÅؽºÆ® } LVCSR_DATA_PHONICS; typedef struct _LVCSR_RECOG_PHONICS_RESULT { long long nResultLen; // Àνİá°ú ±æÀÌ char* pResult; // ÀÎ½Ä °á°ú long long nJsonLen; // Json ±æÀÌ char* pJson; // Json °á°ú double dConfidScore; // ÀÎ½Ä È®·ü°ª long long nDataCnt; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_RESULT* pDataResult; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ LVCSR_DATA_EPD* pResultEPD; // EPD ±¸Á¶Ã¼ } LVCSR_RECOG_PHONICS_RESULT; typedef struct _LVCSR_DATA_SEP_ADDR { long long nSidoLen; // ½Ã/µµ ±æÀÌ char* pSidoStr; // ½Ã/µµ long long nSigunguMainLen; // ½Ã/±º/±¸ main ±æÀÌ char* pSigunguMainStr; // ½Ã/±º/±¸ main long long nSigunguSubLen; // ½Ã/±º/±¸ sub ±æÀÌ char* pSigunguSubStr; // ½Ã/±º/±¸ sub long long nDongLen; // À¾/¸é/µ¿ ±æÀÌ char* pDongStr; // À¾/¸é/µ¿ long long nLiLen; // ¸® ±æÀÌ char* pLiStr; // ¸® long long nJibunLen; // Áö¹ø ±æÀÌ char* pJibunStr; // Áö¹ø long long nRoadNameLen; // µµ·Î¸í ±æÀÌ char* pRoadNameStr; // µµ·Î¸í long long nBldgNoLen; // °Ç¹°¹øÈ£ ±æÀÌ char* pBldgNoStr; // °Ç¹°¹øÈ£ long long nPoiNameLen; // POI¸í ±æÀÌ char* pPoiNameStr; // POI¸í } LVCSR_DATA_SEP_ADDR; typedef struct _LVCSR_DATA_ADDR { LVCSR_TYPE_ADDR nCorrectType; // º¸Á¤ À¯Çü long long nZipcodeLen; // ¿ìÆí¹øÈ£ ±æÀÌ char* pZipcodeStr; // ¿ìÆí¹øÈ£ long long nMainAddressLen; // ±âº»ÁÖ¼Ò ±æÀÌ char* pMainAddressStr; // ±âº»ÁÖ¼Ò long long nAuxAddressLen; // »ó¼¼ÁÖ¼Ò ±æÀÌ char* pAuxAddressStr; // »ó¼¼ÁÖ¼Ò long long nAdditionalSpeechLen; // ¹ÌÁ¤Á¦ÁÖ¼Ò ±æÀÌ(Ãß°¡¹ß¼ºÁÖ¼Ò) char* pAdditionalSpeechStr; // ¹ÌÁ¤Á¦ÁÖ¼Ò LVCSR_DATA_SEP_ADDR pSepAddr; // ºÐ¸®µÈ °á°ú ÁÖ¼Ò ±¸Á¶Ã¼ } LVCSR_DATA_ADDR; typedef struct _LVCSR_DATA_KWD { long long nTokenLen; // ´Ü¾î °á°ú ±æÀÌ char* pTokenStr; // ´Ü¾î °á°ú long long nSymbolLen; // ½Éº¼ °á°ú ±æÀÌ char* pSymbolStr; // ½Éº¼ °á°ú long long nStart; // ±¸°£ ½ÃÀÛ Á¤º¸( ms ) long long nEnd; // ±¸°£ Á¾·á Á¤º¸( ms ) double dScore; // ´Ü¾î Á¡¼ö } LVCSR_DATA_KWD; typedef struct _LVCSR_DATA_SMI { long long nSmiLen; // ÀÚ¸· °á°ú ±æÀÌ char* pSmiStr; // ÀÚ¸· °á°ú } LVCSR_DATA_SMI; typedef struct _LVCSR_RECOG_RESULT { long long nResultLen; // Àνİá°ú ±æÀÌ char* pResult; // ÀÎ½Ä °á°ú double dConfidScore; // ÀÎ½Ä È®·ü°ª long long nCount; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_RESULT* pDataResult; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ long long nSentCount; // ¹®Àå°á°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_RESULT* pDataSentResult; // ¹®Àå°á°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ LVCSR_DATA_EPD* pResultEPD; // EPD ±¸Á¶Ã¼ long long nAddrUsed; // ADDR Used LVCSR_DATA_ADDR* pResultADDR; // ADDR ±¸Á¶Ã¼ long long nKWDCount; // KWD ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_KWD* pResultKWD; // KWD ±¸Á¶Ã¼ long long nSMIUsed; // SMI »ç¿ë¿©ºÎ LVCSR_DATA_SMI* pResultSMI; // SMI ±¸Á¶Ã¼ } LVCSR_RECOG_RESULT; typedef struct _LVCSR_RECOG_MID_RESULT { long long nResultLen; // Áß°£ Àνİá°ú ±æÀÌ char* pResult; // Áß°£ Àνİá°ú int bEngineDetectionFlag; // Engine EPD Flag long long nCount; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_RESULT* pDataResult; // Àνİá°ú »ó¼¼³»¿ë ±¸Á¶Ã¼ } LVCSR_RECOG_MID_RESULT; typedef struct _LVCSR_DATA_TIMEOUT { long long nStartTimeout; // ¼³Á¤µÈ ½Ã°£ µ¿¾È À½¼ºÀÌ ÀԷµÇÁö ¾ÊÀ» °æ¿ì ¹ß»ý long long nDurationTimeout; // ¼³Á¤µÈ ½Ã°£À» ³Ñ°Ü À½¼ºÀÌ °è¼Ó µé¾î¿Ã °æ¿ì ¹ß»ý } LVCSR_DATA_TIMEOUT; typedef struct _LVCSR_DATA_MARGIN { float fEpdMargin; // ³¡Á¡ °ËÃâ ÃÖ´ë ½Ã°£ } LVCSR_DATA_MARGIN; typedef struct _LVCSR_DATA_TRANSACTION { long long nTransactionIdLen; // TransactionId ±æÀÌ char* pTransactionId; // TransactionId Á¤º¸ } LVCSR_DATA_TRANSACTION; typedef struct _LVCSR_DATA_SERVERTIMEOUT { long long nASRTimeOut; // ¼­ºñ½º TimeOut Á¤º¸ long long nMGRTimeOut; // ¸ð´ÏÅ͸µ TimeOut Á¤º¸ } LVCSR_DATA_SERVERTIMEOUT; typedef struct _LVCSR_DATA_AUTHENTICATION { long long nAuthenticationLen; // ÀÎÁõÁ¤º¸ ±æÀÌ char* pAuthentication; // ÀÎÁõÁ¤º¸ } LVCSR_DATA_AUTHENTICATION; typedef struct _LVCSR_DATA_READTIMEOUT { long long nReadTimeOut; // ReadTimeOut Á¤º¸ } LVCSR_DATA_READTIMEOUT; typedef struct _LVCSR_DATA_INFO { long long nModelId; // ¸ðµ¨ ID long long nKwdId; // KWD¸ðµ¨ ID LVCSR_TYPE_CODEC nCodecType; // CODEC ŸÀÔ LVCSR_SET_CHARSET nCharSet; // ij¸¯ÅÍ ¼Â LVCSR_USED_EPD bEpdUsed; // EPD »ç¿ë¿©ºÎ LVCSR_USED_SCORE bScoreUsed; // SCORE »ç¿ë ¿©ºÎ } LVCSR_DATA_INFO; typedef struct _LVCSR_DATA_RESOURCE { double dNetworkUsage; // Network »ç¿ë·® int nCPUUsage; // CPU »ç¿ëÀ² int nGPUUsage; // GPU »ç¿ëÀ² int nMemUsage; // MEM »ç¿ëÀ² int nDiskUsage; // DISK »ç¿ëÀ² } LVCSR_DATA_RESOURCE; typedef struct _LVCSR_CHANNEL_LIST { long long nChannelID; // ä³Î ID LVCSR_TYPE_CHANNEL nChannelStat; // ä³Î »óÅ } LVCSR_CHANNEL_LIST; typedef struct _LVCSR_DATA_CHANNEL { long long nChannelCnt; // Àüü ä³Î ¼ö long long nUsedCnt; // »ç¿ë ä³Î ¼ö LVCSR_CHANNEL_LIST* pChannelInfo; // ä³Î »óÅ Á¤º¸ } LVCSR_DATA_CHANNEL; typedef struct _LVCSR_KWD_LIST { long long nKwdID; // KWD¸ðµ¨ ID long long nKwdNameLen; // KWD¸ðµ¨ À̸§ ±æÀÌ char* pKwdName; // KWD¸ðµ¨ À̸§ } LVCSR_KWD_LIST; typedef struct _LVCSR_MODEL_LIST { long long nModelID; // Àνĸ𵨠ID long long nModelNameLen; // Àνĸ𵨠À̸§ ±æÀÌ char* pModelName; // Àνĸ𵨠À̸§ long long nModelType; // Àνĸ𵨠ŸÀÔ(Áö¿ø ±â´É) long long nSamplingRate; // Àνĸ𵨠SampleRate float fAcousticScale; // À½Çâ°¡ÁßÄ¡ Á¤º¸ long long nKwdCnt; // KWD ¸ðµ¨ °³¼ö LVCSR_KWD_LIST* pKwdInfo; // KWD ¸ðµ¨ Á¤º¸ } LVCSR_MODEL_LIST; typedef struct _LVCSR_DATA_MODEL { long long nModelCnt; // ¸ðµ¨ ¼ö LVCSR_MODEL_LIST* pModelInfo; // ¸ðµ¨ Á¤º¸ } LVCSR_DATA_MODEL; typedef struct _LVCSR_DATA_DATETERM { long long nStartDate; // ½ÃÀÛÀÏÀÚ long long nEndDate; // Á¾·áÀÏÀÚ } LVCSR_DATA_DATETERM; typedef struct _LVCSR_STATDATE_LIST { long long nStatTime; // ±â·Ï ½Ã°¢ unsigned int nTotalSuccess; // ÃÑ ¼º°ø °Ç¼ö unsigned int nTotalFail; // ÃÑ ½ÇÆÐ °Ç¼ö unsigned int nMaxClientFail; // ÃÑ ½ÇÆÐ °Ç¼ö(max client error) unsigned int nEtcFail; // ÃÑ ½ÇÆÐ °Ç¼ö(max client error¸¦ Á¦¿ÜÇÑ ¿¡·¯) unsigned long nTotalBytes; // ÃÑ À½¼º Å©±â (Bytes) float fTotalElapsedTime; // ÃÑ Àνİá°ú ¼Ò¿ä½Ã°£ float fMaxElapsedTime; // ÃÖ´ë Àνİá°ú ¼Ò¿ä ½Ã°£ unsigned int nMaxElapsedBytes; // ÃÖ´ë Àνİá°ú ¼Ò¿ä ½Ã°£ ´ç½Ã À½¼º Å©±â (Bytes) unsigned int nMaxBytesSize; // ÃÖ´ë À½¼º Å©±â (Bytes) float fMaxBytesElapsed; // ÃÖ´ë À½¼º Å©±â ´ç½Ã Àνİá°ú ¼Ò¿ä ½Ã°£ } LVCSR_STATDATE_LIST; typedef struct _LVCSR_DATA_STATDATE { long long nStatDateCnt; // Åë°è ¼ö LVCSR_STATDATE_LIST* pStatDateInfo; // Åë°è Á¤º¸ } LVCSR_DATA_STATDATE; typedef struct _LVCSR_DATA_KWD_RESULT { char szToken[MAX_NAME_SIZE]; // ´Ü¾î Àνİá°ú char szSymbol[MAX_NAME_SIZE]; // ½Éº¼ Àνİá°ú } LVCSR_DATA_KWD_RESULT; typedef struct _LVCSR_DATA_WORD { long long nModelId; // Àνĸ𵨠ID long long nKWDNameLen; // KWD¸ðµ¨ À̸§ ±æÀÌ char* pKWDName; // KWD¸ðµ¨ À̸§ long long nKWDResultCnt; // KWD ±¸Á¶Ã¼ °³¼ö LVCSR_DATA_KWD_RESULT* pKWDResult; // KWD ±¸Á¶Ã¼ } LVCSR_DATA_WORD; typedef struct _LVCSR_DATA_WORD_KWD { long long nModelId; // Àνĸ𵨠ID long long nKWDNameLen; // KWD¸ðµ¨ À̸§ ±æÀÌ char* pKWDName; // KWD¸ðµ¨ À̸§ } LVCSR_DATA_WORD_KWD; typedef struct _LVCSR_DATA_LSTM { long long nRefLen; // Á¤´ä °á°ú ±æÀÌ char* pRefStr; // Á¤´ä °á°ú long long nHypLen; // ÀÎ½Ä °á°ú ±æÀÌ char* pHypStr; // ÀÎ½Ä °á°ú LVCSR_SET_CHARSET nCharSet; // ij¸¯ÅÍ ¼Â LVCSR_USED_WORD bWordUsed; // ´Ü¾î Àνķü »ç¿ë ¿©ºÎ } LVCSR_DATA_LSTM; typedef struct _LVCSR_LSTM_SUMMARY { long long nTotal; // Àüü °³¼ö long long nInsert; // »ðÀÔ °³¼ö long long nDelete; // »èÁ¦ °³¼ö long long nSubstitute; // ´ëÄ¡ °³¼ö long long nMatch; // ÀÏÄ¡ °³¼ö double dErrorRate; // ¿À·ù·ü double dRecgRate; // Àνķü long long nDistance; // ¿À·ù °³¼ö } LVCSR_LSTM_SUMMARY; typedef struct _LVCSR_DATA_ALIGN { char pTokenStr; // Align °á°ú } LVCSR_DATA_ALIGN; typedef struct _LVCSR_DATA_VECTOR { long long nTokenLen; // ´Ü¾î °á°ú ±æÀÌ char* pTokenStr; // ´Ü¾î °á°ú } LVCSR_DATA_VECTOR; typedef struct _LVCSR_LSTM_MATCH { long long pMatchCnt; // ±¸Á¶Ã¼ °³¼ö long long nAlignLen; // Align ¹®ÀÚ¿­±æÀÌ char* pAlignStr; // Align ¹®ÀÚ¿­ LVCSR_DATA_ALIGN* pDataAlign; // Align ±¸Á¶Ã¼ long long nRefLen; // Ref ¹®ÀÚ¿­ ±æÀÌ char* pRefStr; // Ref ¹®ÀÚ¿­ LVCSR_DATA_VECTOR* pRefResult; // Ref ±¸Á¶Ã¼ long long nHypLen; // Hyp ¹®ÀÚ¿­ ±æÀÌ char* pHypStr; // Hyp ¹®ÀÚ¿­ LVCSR_DATA_VECTOR* pHypResult; // Hyp ±¸Á¶Ã¼ } LVCSR_LSTM_MATCH; typedef struct _LVCSR_LSTM_RESULT { LVCSR_LSTM_SUMMARY pLstmSummary; // Levenshtein ¿ä¾à Á¤º¸ LVCSR_LSTM_MATCH pLstmMatch; // Levenshtein Á¤·Ä Á¤º¸ } LVCSR_LSTM_RESULT; typedef struct _CASR_HEAD_PACK { char CHID[6]; char RVD1; char TYPE; char RVD2; char LENG[10]; char RVD3; } CASR_HEAD_PACK; typedef struct _CRES_HEAD_PACK { char CHID[6]; //socket char RVD1; //°ø¹é char TYPE; //S char RVD2; //°ø¹é char KIND; //Á¾·ù char RVD3; //°ø¹é char USED[2]; //¼º°ø¿©ºÎ char RVD4; //°ø¹é char LENG[10]; //¹®ÀÚ char RVD5; } CRES_HEAD_PACK; typedef struct ssl_st SSL; typedef struct ssl_ctx_st SSL_CTX; typedef struct _LVCSR_SOCK_TIMEOUT { long long nConnTIMEOUT; // Connection TimeOut(Sec) long long nReadTIMEOUT; // Read TimeOut(Sec) } LVCSR_SOCK_TIMEOUT; typedef struct _LVCSR_SOCK_HEAD { long uSock; // ¼ÒÄÏ ID SSL* pSSL; // SSL Á¤º¸ // SSL ¹Ì»ç¿ë½Ã NULL°ª SSL_CTX* pContext; // SSL Context Á¤º¸ // SSL ¹Ì»ç¿ë½Ã NULL°ª LVCSR_USED_SSL nFlag; // SSL »ç¿ë À¯¹« LVCSR_USED_CRT_CHECK nCheck; // ÀÎÁõ¼­ üũ À¯¹« LVCSR_SOCK_TIMEOUT pTimeOut; // ¼ÒÄÏ Å¸ÀӾƿô long nError; // SSL ¿¡·¯ Á¤º¸ // SSL ¹Ì»ç¿ë½Ã 0°ª } LVCSR_SOCK_HEAD; #ifdef __cplusplus extern "C" { #endif LVCSR_RESULT LVCSR_LIBRARY_API ASR_VERSION(); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_SSL(char* pCRT, char* pKEY, char* pCA, char* pPASS, LVCSR_SOCK_HEAD* pHEAD); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_OPEN(char* cHOST, long nPORT, long nConnTIMEOUT, long nReadTIMEOUT, LVCSR_SOCK_HEAD* pHEAD); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_CLOS(LVCSR_SOCK_HEAD* pHEAD); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_OPEN(LVCSR_SOCK_HEAD* pHEAD); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_CLOS(LVCSR_SOCK_HEAD* pHEAD); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_DATA(LVCSR_SOCK_HEAD* pHEAD, char* cBUFF, long nLENG, long bEND, LVCSR_EPD_INFO* pEpdInfo); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_STR_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_WORD_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SENT_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_ADDR_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_KWD_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SMI_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_ADD_INFO(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_CHAR_TIME* pCharTime, LVCSR_RECOG_ADD_INFO* pRecgAddInfo); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_ADD_INFO_FREE(LVCSR_DATA_CHAR_TIME* pCharTime, LVCSR_RECOG_ADD_INFO* pRecgAddInfo); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_PHONICS_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_PHONICS* pDataPhonics, LVCSR_RECOG_MID_RESULT* pRecgMidResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_PHONICS_PROC_FREE(LVCSR_DATA_PHONICS* pDataPhonics, LVCSR_RECOG_MID_RESULT* pRecgMidResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_NBEST_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_NBEST_RESULT* pRecgNbestResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_PHONICS_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_PHONICS_RESULT* pRecgPhonicsResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_LIST_VIEW(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_MODEL* pDataModel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_MID_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_MID_RESULT* pRecgMidResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_MID_PHONICS_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_MID_RESULT* pRecgMidResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_DET_PHONICS_PROC(LVCSR_SOCK_HEAD* pHEAD, LVCSR_RECOG_PHONICS_RESULT* pRecgPhonicsResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_SET_AUTH(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_AUTHENTICATION* pDataAuthentication); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_SET_READTIME(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_READTIMEOUT* pDataReadtimeout); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_SET_TRANS(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_TRANSACTION* pDataTransaction); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_LIST(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_INFO* pDataInfo); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_EPD_TIMEOUT(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_TIMEOUT* pDataTimeOut); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_EPD_MARGIN(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_MARGIN* pDataMargin); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_SET_PHONICS(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_PHONICS* pDataPhonics); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RESOURCE(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_RESOURCE* pDataResource); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_CHANNEL(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_CHANNEL* pDataChannel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_MODEL(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_MODEL* pDataModel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_TIMEOUT(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_SERVERTIMEOUT* pDataServertimeout); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_STAT(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_DATETERM* pDataTerm, LVCSR_DATA_STATDATE* pDataStatDate); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_CREATE_WORD(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_WORD* pDataWord); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_DELETE_WORD(LVCSR_SOCK_HEAD* pHEAD, LVCSR_DATA_WORD_KWD* pDataWordKwd); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_CHANNEL_FREE(LVCSR_DATA_CHANNEL* pDataChannel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_MODEL_FREE(LVCSR_DATA_MODEL* pDataModel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_STAT_FREE(LVCSR_DATA_DATETERM* pDataTerm, LVCSR_DATA_STATDATE* pDataStatDate); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_LIST_VIEW_FREE(LVCSR_DATA_MODEL* pDataModel); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_MID_PROC_FREE(LVCSR_RECOG_MID_RESULT* pRecgMidResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_PROC_FREE(LVCSR_RECOG_RESULT* pRecgResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_NBEST_PROC_FREE(LVCSR_RECOG_NBEST_RESULT* pRecgNbestResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_RECG_PHONICS_PROC_FREE(LVCSR_RECOG_PHONICS_RESULT* pRecgPhonicsResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_LSTM(LVCSR_DATA_LSTM* pDataLstm, LVCSR_LSTM_RESULT* pDataLstmResult); LVCSR_RESULT LVCSR_LIBRARY_API ASR_SVC_LSTM_FREE(LVCSR_DATA_LSTM* pDataLstm, LVCSR_LSTM_RESULT* pDataLstmResult); #ifdef __cplusplus }; #endif #endif