From: Suyeon Hwang Date: Wed, 15 Feb 2017 08:11:10 +0000 (+0900) Subject: Update header and doc files written in English X-Git-Tag: accepted/tizen/unified/20170428.004007~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=b0430c08184979478ad4360f774d0c17eaed0610;p=platform%2Fcore%2Fuifw%2Fstt.git Update header and doc files written in English Change-Id: I718be006d8b331478b938e5ad48e50f200a91c43 Signed-off-by: Suyeon Hwang (cherry picked from commit 9e320ac0410de7b4ef06e7c9676e8ac2c7cc1189) --- diff --git a/doc/uix_stt_doc.h b/doc/uix_stt_doc.h index e58d761..07c4eab 100644 --- a/doc/uix_stt_doc.h +++ b/doc/uix_stt_doc.h @@ -18,19 +18,18 @@ #ifndef __TIZEN_UIX_STT_DOC_H__ #define __TIZEN_UIX_STT_DOC_H__ + /** - * @defgroup CAPI_UIX_STT_MODULE STT * @ingroup CAPI_UIX_FRAMEWORK + * @defgroup CAPI_UIX_STT_MODULE STT * @brief The @ref CAPI_UIX_STT_MODULE API provides functions to recognize the speech. - * * @section CAPI_UIX_STT_MODULE_HEADER Required Header - * \#include + * \#include * * @section CAPI_UIX_STT_MODULE_OVERVIEW Overview * A main function of Speech-To-Text (below STT) API recognizes sound data recorded by users. * After choosing a language, applications will start recording and recognizing. * After recording, the applications will receive the recognized result. - * * To use of STT, use the following steps:
* 1. Create a handle
* 2. Register callback functions for notifications
@@ -39,7 +38,6 @@ * 5. Stop recording
* 6. Get result after processing
* 7. Destroy a handle
- * * The STT has a client-server for the service of multi-applications. * The STT service always works in the background as a server. * If the service is not working, client library will invoke it and client will communicate with it. @@ -52,7 +50,6 @@ * @image html capi_uix_stt_state_diagram.png "State diagram" * * @section CAPI_STT_MODULE_STATE_TRANSITIONS State Transitions - * * * * @@ -90,7 +87,6 @@ * @section CAPI_STT_MODULE_STATE_DEPENDENT_FUNCTION_FUNCTION_CALLS State Dependent Function Calls * The following table shows state-dependent function calls. It is forbidden to call functions listed below in wrong states. * Violation of this rule may result in an unpredictable behavior. - * *
FUNCTION
* * @@ -215,15 +211,14 @@ * * @section CAPI_UIX_STT_MODULE_FEATURE Related Features * This API is related with the following features:
- * - http://tizen.org/feature/speech.recognition
- * - http://tizen.org/feature/microphone
- * + * - http://tizen.org/feature/speech.recognition
+ * - http://tizen.org/feature/microphone
* It is recommended to design feature related codes in your application for reliability.
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
* More details on featuring your application can be found from Feature Element. - * */ + #endif /* __TIZEN_UIX_STT_DOC_H__ */ diff --git a/doc/uix_stt_engine_main_doc.h b/doc/uix_stt_engine_main_doc.h index 9d91867..e811d20 100755 --- a/doc/uix_stt_engine_main_doc.h +++ b/doc/uix_stt_engine_main_doc.h @@ -18,25 +18,21 @@ #ifndef __TIZEN_UIX_STT_ENGINE_DOC_H__ #define __TIZEN_UIX_STT_ENGINE_DOC_H__ + /** * @ingroup CAPI_UIX_FRAMEWORK * @defgroup CAPI_UIX_STTE_MODULE STT Engine * @brief The @ref CAPI_UIX_STTE_MODULE APIs provide functions to operate Speech-To-Text Engine. - * - * * @section CAPI_UIX_STTE_MODULE_HEADER Required Header - * \#include - * + * \#include * * @section CAPI_UIX_STTE_MODULE_OVERVIEW Overview * Speech-To-Text Engine (below STTE) is an engine for recording speech and resulting in texts of speech recognition. * Using the @ref CAPI_UIX_STTE_MODULE APIs, STTE developers can provide STTE service users, who want to apply STTE, with functions necessary to operate the engine. * According to the indispensability of STTE services, there are two ways to provide them to the users.
- * * A. Required STTE services
* These services are indispensable to operate STTE. Therefore, the STTE developers MUST implement callback functions corresponding to the required STTE services. * The following is a list of the callback functions.
- * *
FUNCTION
* * @@ -107,19 +103,16 @@ * * *
FUNCTIONCalled when the engine service user checks whether STT engine needs the application's credential.
- * * The STTE developers can register the above callback functions at a time with using a structure 'stte_request_callback_s' and an API 'stte_main()'. * To operate STTE, the following steps should be used:
* 1. Create a structure 'stte_request_callback_s'.
* 2. Implement callback functions. (NOTE that the callback functions should return appropriate values in accordance with the instruction. - * If the callback function returns an unstated value, STT framework will handle it as #STTE_ERROR_OPERATION_FAILED.)
+ * If the callback function returns an unstated value, STT framework will handle it as #STTE_ERROR_OPERATION_FAILED.)
* 3. Register callback functions using 'stte_main()'. (The registered callback functions will be called when the STTE service users request the STTE services.)
* 4. Use 'service_app_main()' for working STTE.
- * * B. Optional STTE services
* Unlike the required STTE services, these services are optional to operate STTE. The followings are optional STTE services.
* - receive/provide the private data
- * * If the STTE developers want to provide the above services, use the following APIs and implement the corresponding callback functions:
* * @@ -139,10 +132,8 @@ * *
*
- * * Using the above APIs, the STTE developers can register the optional callback functions respectively. * (For normal operation, put those APIs before 'service_app_main()' starts.) - * * Unlike callback functions, the following APIs are functions for getting and sending data. The STTE developers can use these APIs when they implement STTE services:
* * @@ -163,18 +154,16 @@ * *
* - * * @section CAPI_UIX_STTE_MODULE_FEATURE Related Features * This API is related with the following features:
- * - http://tizen.org/feature/speech.recognition
- * - http://tizen.org/feature/microphone
- * + * - http://tizen.org/feature/speech.recognition
+ * - http://tizen.org/feature/microphone
* It is recommended to design feature related codes in your application for reliability.
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
* More details on featuring your application can be found from Feature Element. - * */ + #endif /* __TIZEN_UIX_STT_ENGINE_DOC_H__ */ diff --git a/include/stt.h b/include/stt.h index 7a82ced..d457caf 100755 --- a/include/stt.h +++ b/include/stt.h @@ -14,118 +14,136 @@ * limitations under the License. */ + #ifndef __STT_H__ #define __STT_H__ + #include + /** * @file stt.h */ + /** * @addtogroup CAPI_UIX_STT_MODULE * @{ */ + #ifdef __cplusplus extern "C" { #endif + /** - * @brief Enumerations for error codes. + * @brief Enumeration for error codes. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - STT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - STT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ - STT_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ - STT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,/**< Invalid parameter */ - STT_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< No answer from the STT service */ - STT_ERROR_RECORDER_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */ - STT_ERROR_OUT_OF_NETWORK = TIZEN_ERROR_NETWORK_DOWN, /**< Network is down */ - STT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,/**< Permission denied */ - STT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< STT NOT supported */ - STT_ERROR_INVALID_STATE = TIZEN_ERROR_STT | 0x01, /**< Invalid state */ - STT_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_STT | 0x02, /**< Invalid language */ - STT_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_STT | 0x03, /**< No available engine */ - STT_ERROR_OPERATION_FAILED = TIZEN_ERROR_STT | 0x04, /**< Operation failed */ - STT_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_STT | 0x05, /**< Not supported feature of current engine */ - STT_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x06, /**< Recording timed out @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - STT_ERROR_NO_SPEECH = TIZEN_ERROR_STT | 0x07, /**< No speech while recording @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - STT_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_STT | 0x08, /**< Progress to ready is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - STT_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_STT | 0x09, /**< Progress to recording is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - STT_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_STT | 0x10, /**< Progress to processing is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ - STT_ERROR_SERVICE_RESET = TIZEN_ERROR_STT | 0x11 /**< Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + STT_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ + STT_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ + STT_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + STT_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< No answer from the STT service */ + STT_ERROR_RECORDER_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */ + STT_ERROR_OUT_OF_NETWORK = TIZEN_ERROR_NETWORK_DOWN, /**< Network is down */ + STT_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + STT_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< STT NOT supported */ + STT_ERROR_INVALID_STATE = TIZEN_ERROR_STT | 0x01, /**< Invalid state */ + STT_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_STT | 0x02, /**< Invalid language */ + STT_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_STT | 0x03, /**< No available engine */ + STT_ERROR_OPERATION_FAILED = TIZEN_ERROR_STT | 0x04, /**< Operation failed */ + STT_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_STT | 0x05, /**< Not supported feature of current engine */ + STT_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x06, /**< Recording timed out @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_NO_SPEECH = TIZEN_ERROR_STT | 0x07, /**< No speech while recording @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_STT | 0x08, /**< Progress to ready is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_STT | 0x09, /**< Progress to recording is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_STT | 0x10, /**< Progress to processing is not finished @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ + STT_ERROR_SERVICE_RESET = TIZEN_ERROR_STT | 0x11 /**< Service reset @if MOBILE (Since 3.0) @elseif WEARABLE (Since 2.3.2) @endif */ } stt_error_e; + /** * @brief Definition for free form dictation and default type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RECOGNITION_TYPE_FREE "stt.recognition.type.FREE" + /** * @brief Definition for continuous free dictation. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RECOGNITION_TYPE_FREE_PARTIAL "stt.recognition.type.FREE.PARTIAL" + /** * @brief Definition for search. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RECOGNITION_TYPE_SEARCH "stt.recognition.type.SEARCH" + /** * @brief Definition for web search. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RECOGNITION_TYPE_WEB_SEARCH "stt.recognition.type.WEB_SEARCH" + /** * @brief Definition for map. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RECOGNITION_TYPE_MAP "stt.recognition.type.MAP" + /** * @brief Definition for none message. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_NONE "stt.result.message.none" + /** * @brief Definition for failed recognition because the speech started too soon. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_ERROR_TOO_SOON "stt.result.message.error.too.soon" + /** * @brief Definition for failed recognition because the speech is too short. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_ERROR_TOO_SHORT "stt.result.message.error.too.short" + /** * @brief Definition for failed recognition because the speech is too long. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_ERROR_TOO_LONG "stt.result.message.error.too.long" + /** * @brief Definition for failed recognition because the speech is too quiet to listen. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_ERROR_TOO_QUIET "stt.result.message.error.too.quiet" + /** * @brief Definition for failed recognition because the speech is too loud to listen. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ #define STT_RESULT_MESSAGE_ERROR_TOO_LOUD "stt.result.message.error.too.loud" + /** * @brief Definition for failed recognition because the speech is too fast to listen. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif @@ -138,80 +156,79 @@ typedef enum { * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - STT_STATE_CREATED = 0, /**< 'CREATED' state */ - STT_STATE_READY = 1, /**< 'READY' state */ - STT_STATE_RECORDING = 2, /**< 'RECORDING' state */ - STT_STATE_PROCESSING = 3 /**< 'PROCESSING' state*/ + STT_STATE_CREATED = 0, /**< 'CREATED' state */ + STT_STATE_READY = 1, /**< 'READY' state */ + STT_STATE_RECORDING = 2, /**< 'RECORDING' state */ + STT_STATE_PROCESSING = 3 /**< 'PROCESSING' state*/ } stt_state_e; + /** * @brief Enumeration for result event. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - STT_RESULT_EVENT_FINAL_RESULT = 0, /**< Event when the recognition full or last result is ready */ - STT_RESULT_EVENT_PARTIAL_RESULT, /**< Event when the recognition partial result is ready */ - STT_RESULT_EVENT_ERROR /**< Event when the recognition has failed */ + STT_RESULT_EVENT_FINAL_RESULT = 0, /**< Event when the recognition full or last result is ready */ + STT_RESULT_EVENT_PARTIAL_RESULT, /**< Event when the recognition partial result is ready */ + STT_RESULT_EVENT_ERROR /**< Event when the recognition has failed */ } stt_result_event_e; + /** * @brief Enumeration for result time callback event. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - STT_RESULT_TIME_EVENT_BEGINNING = 0, /**< Event when the token is beginning type */ - STT_RESULT_TIME_EVENT_MIDDLE = 1, /**< Event when the token is middle type */ - STT_RESULT_TIME_EVENT_END = 2 /**< Event when the token is end type */ + STT_RESULT_TIME_EVENT_BEGINNING = 0, /**< Event when the token is beginning type */ + STT_RESULT_TIME_EVENT_MIDDLE = 1, /**< Event when the token is middle type */ + STT_RESULT_TIME_EVENT_END = 2 /**< Event when the token is end type */ } stt_result_time_event_e; + /** * @brief Enumeration for silence detection type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef enum { - STT_OPTION_SILENCE_DETECTION_FALSE = 0, /**< Silence detection type - False */ - STT_OPTION_SILENCE_DETECTION_TRUE = 1, /**< Silence detection type - True */ - STT_OPTION_SILENCE_DETECTION_AUTO = 2 /**< Silence detection type - Auto */ + STT_OPTION_SILENCE_DETECTION_FALSE = 0, /**< Silence detection type - False */ + STT_OPTION_SILENCE_DETECTION_TRUE = 1, /**< Silence detection type - True */ + STT_OPTION_SILENCE_DETECTION_AUTO = 2 /**< Silence detection type - Auto */ } stt_option_silence_detection_e; + /** - * @brief A structure of STT handler. + * @brief A structure of STT handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ typedef struct stt_s *stt_h; + /** * @brief Called to get the engine information. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] engine_id Engine id + * @param[in] engine_id Engine ID * @param[in] engine_name Engine name * @param[in] user_data User data passed from the stt_setting_foreach_supported_engines() - * - * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop + * @return @c true to continue with the next iteration of the loop, + * otherwise @c false to break out of the loop * @pre stt_foreach_supported_engines() will invoke this callback. - * * @see stt_foreach_supported_engines() */ typedef bool(*stt_supported_engine_cb)(stt_h stt, const char* engine_id, const char* engine_name, void* user_data); + /** * @brief Called when STT gets the recognition result from the engine. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks After stt_stop() is called, silence is detected from recording, or partial result is occured, - * this function is called. - * + * @remarks After stt_stop() is called, silence is detected from recording, or partial result is occured, this function is called. * @param[in] stt The STT handle * @param[in] event The result event * @param[in] data Result texts * @param[in] data_count Result text count * @param[in] msg Engine message (e.g. #STT_RESULT_MESSAGE_NONE, #STT_RESULT_MESSAGE_ERROR_TOO_SHORT) * @param[in] user_data The user data passed from the callback registration function - * * @pre stt_stop() will invoke this callback if you register it using stt_set_result_cb(). * @post If this function is called and event is #STT_RESULT_EVENT_FINAL_RESULT, the STT state will be #STT_STATE_READY. - * * @see stt_stop() * @see stt_set_recognition_result_cb() * @see stt_unset_recognition_result_cb() @@ -219,10 +236,10 @@ typedef bool(*stt_supported_engine_cb)(stt_h stt, const char* engine_id, const c typedef void (*stt_recognition_result_cb)(stt_h stt, stt_result_event_e event, const char** data, int data_count, const char* msg, void *user_data); + /** * @brief Called when STT get the result time stamp in free partial type. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * * @param[in] stt The STT handle * @param[in] index The result index * @param[in] event The token event @@ -230,352 +247,313 @@ typedef void (*stt_recognition_result_cb)(stt_h stt, stt_result_event_e event, c * @param[in] start_time The start time of result text * @param[in] end_time The end time of result text * @param[in] user_data The user data passed from the foreach function - * - * @return @c true to continue with the next iteration of the loop \n @c false to break out of the loop - * + * @return @c true to continue with the next iteration of the loop + * otherwise @c false to break out of the loop * @pre stt_recognition_result_cb() should be called. - * * @see stt_recognition_result_cb() */ typedef bool (*stt_result_time_cb)(stt_h stt, int index, stt_result_time_event_e event, const char* text, long start_time, long end_time, void* user_data); + /** * @brief Called when the state of STT is changed. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * * @param[in] stt The STT handle * @param[in] previous A previous state * @param[in] current A current state * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback using stt_set_state_changed_cb() to detect changing state. - * * @see stt_set_state_changed_cb() * @see stt_unset_state_changed_cb() */ typedef void (*stt_state_changed_cb)(stt_h stt, stt_state_e previous, stt_state_e current, void* user_data); + /** * @brief Called when an error occurs. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * * @param[in] stt The STT handle * @param[in] reason The error type (e.g. #STT_ERROR_OUT_OF_NETWORK, #STT_ERROR_IO_ERROR) * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback using stt_set_error_cb() to detect error. - * * @see stt_set_error_cb() * @see stt_unset_error_cb() */ typedef void (*stt_error_cb)(stt_h stt, stt_error_e reason, void *user_data); + /** * @brief Called to retrieve the supported languages. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. - * * @param[in] stt The STT handle * @param[in] language The language * @param[in] user_data The user data passed from the foreach function - * - * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop + * @return @c true to continue with the next iteration of the loop, + * @c false to break out of the loop * @pre stt_foreach_supported_languages() will invoke this callback. - * * @see stt_foreach_supported_languages() */ typedef bool (*stt_supported_language_cb)(stt_h stt, const char* language, void* user_data); + /** * @brief Called when the default language is changed. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * * @param[in] stt The STT handle * @param[in] previous_language A previous language * @param[in] current_language A current language * @param[in] user_data The user data passed from the callback registration function - * * @see stt_set_default_language_changed_cb() */ typedef void (*stt_default_language_changed_cb)(stt_h stt, const char* previous_language, const char* current_language, void* user_data); + /** * @brief Called when the engine is changed. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. For example, "ko_KR" for Korean, "en_US" for American English. - * * @param[in] stt The STT handle - * @param[in] engine_id Engine id + * @param[in] engine_id Engine ID * @param[in] language The default language * @param[in] support_silence Whether the silence detection is supported or not * @param[in] need_credential The necessity of credential * @param[in] user_data The user data passed from the callback registration function - * * @see stt_set_engine_changed_cb() */ typedef void (*stt_engine_changed_cb)(stt_h stt, const char* engine_id, const char* language, bool support_silence, bool need_credential, void* user_data); + /** * @brief Creates a STT handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks If the function succeeds, @a stt handle must be released with stt_destroy(). - * * @param[out] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_OUT_OF_MEMORY Out of memory * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @post If this function is called, the STT state will be #STT_STATE_CREATED. - * * @see stt_destroy() */ int stt_create(stt_h* stt); + /** * @brief Destroys a STT handle. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @see stt_create() */ int stt_destroy(stt_h stt); + /** * @brief Retrieves supported engine information using a callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to invoke * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Success * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE STT Not initialized * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. * @post This function invokes stt_supported_engine_cb() repeatedly for getting engine information. - * * @see stt_supported_engine_cb() */ int stt_foreach_supported_engines(stt_h stt, stt_supported_engine_cb callback, void* user_data); + /** - * @brief Gets the current engine id. + * @brief Gets the current engine ID. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks If the function is success, @a engine_id must be released using free(). - * * @param[in] stt The STT handle - * @param[out] engine_id Engine id - * - * @return 0 on success, otherwise a negative error value + * @param[out] engine_id Engine ID + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Success * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE STT Not initialized * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_engine() */ int stt_get_engine(stt_h stt, char** engine_id); + /** - * @brief Sets the engine id. + * @brief Sets the engine ID. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder * @privilege %http://tizen.org/privilege/appmanager.launch - * * @remarks A privilege (%http://tizen.org/privilege/appmanager.launch) is necessary since 3.0. - * * @param[in] stt The STT handle - * @param[in] engine_id Engine id - * - * @return 0 on success, otherwise a negative error value + * @param[in] engine_id Engine ID + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Success * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE STT Not initialized * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_get_engine() */ int stt_set_engine(stt_h stt, const char* engine_id); + /** * @brief Sets the app credential. * @details Using this API, the application can set a credential. - * The credential is a key to verify the authorization about using the engine. - * If the application sets the credential, it will be able to use functions of the engine entirely. + * The credential is a key to verify the authorization about using the engine. + * If the application sets the credential, it will be able to use functions of the engine entirely. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @remarks The necessity of the credential depends on the engine. In case of the engine which is basically embedded in Tizen, the credential is not necessary so far. - * However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. - * + * However, if the user wants to apply the 3rd party's engine, the credential may be necessary. In that case, please follow the policy provided by the corresponding engine. * @param[in] stt The STT handle * @param[in] credential The app credential - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Success * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - * * @pre The state should be #STT_STATE_CREATED or #STT_STATE_READY. - * * @see stt_start() */ - int stt_set_credential(stt_h stt, const char* credential); + /** * @brief Sets the private data to stt engine. * @details The private data is the setting parameter for applying keys provided by the engine. - * Using this API, the application can set the private data and use the corresponding key of the engine. - * For example, if the engine provides 'partial recognition' as a recognition type, the application can set the private data as the following. \n - * int ret = stt_set_private_data(stt_h, "recognition_type", "PARTIAL"); - * + * Using this API, the application can set the private data and use the corresponding key of the engine. + * For example, if the engine provides 'partial recognition' as a recognition type, the application can set the private data as the following. + * int ret = stt_set_private_data(stt_h, "recognition_type", "PARTIAL"); * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @remarks If the engine is replaced with the other engine, the key may be ignored. - * * @param[in] stt The STT handle * @param[in] key The field name of private data * @param[in] data The data for set - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_TIMED_OUT No answer from the STT service - * * @pre The state should be #STT_STATE_READY. - * * @see stt_get_private_data() */ int stt_set_private_data(stt_h stt, const char* key, const char* data); + /** * @brief Gets the private data from stt engine. * @details The private data is the information provided by the engine. - * Using this API, the application can get the private data which corresponds to the key from the engine. - + * Using this API, the application can get the private data which corresponds to the key from the engine. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @remarks If the engine is replaced with the other engine, the key may be ignored. - * + * @remarks The @a data must be released using free() when it is no longer required. * @param[in] stt The STT handle * @param[in] key The field name of private data * @param[out] data The data field of private data - * - * @remarks The @a data must be released using free() when it is no longer required. - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_TIMED_OUT No answer from the STT service - * * @pre The state should be #STT_STATE_READY. - * * @see stt_set_private_data() */ int stt_get_private_data(stt_h stt, const char* key, char** data); + /** * @brief Connects the STT service asynchronously. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * @post If this function is successful, the STT state will be #STT_STATE_READY. \n - * If this function is failed, the error callback is called. (e.g. #STT_ERROR_ENGINE_NOT_FOUND) - * + * @post If this function is successful, the STT state will be #STT_STATE_READY. + * If this function is failed, the error callback is called. (e.g. #STT_ERROR_ENGINE_NOT_FOUND) * @see stt_unprepare() */ int stt_prepare(stt_h stt); + /** * @brief Disconnects the STT service. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. * @post If this function is called, the STT state will be #STT_STATE_CREATED. - * * @see stt_prepare() */ int stt_unprepare(stt_h stt); + /** * @brief Retrieves all supported languages of current engine using callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to invoke * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OUT_OF_MEMORY Out of memory @@ -583,52 +561,48 @@ int stt_unprepare(stt_h stt); * @retval #STT_ERROR_ENGINE_NOT_FOUND No available engine * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @post This function invokes stt_supported_language_cb() repeatedly for getting languages. - * * @see stt_supported_language_cb() * @see stt_get_default_language() */ int stt_foreach_supported_languages(stt_h stt, stt_supported_language_cb callback, void* user_data); + /** * @brief Gets the default language set by the user. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. \n - * For example, "ko_KR" for Korean, "en_US" for American English. \n - * If the function succeeds, @a language must be released using free() when it is no longer required. - * + * @remarks The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. + * For example, "ko_KR" for Korean, "en_US" for American English. + * If the function succeeds, @a language must be released using free() when it is no longer required. * @param[in] stt The STT handle * @param[out] language The language - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @see stt_foreach_supported_languages() */ int stt_get_default_language(stt_h stt, char** language); + /** * @brief Gets the current STT state. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[out] state The current STT state - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @see stt_start() * @see stt_stop() * @see stt_cancel() @@ -636,169 +610,160 @@ int stt_get_default_language(stt_h stt, char** language); */ int stt_get_state(stt_h stt, stt_state_e* state); + /** * @brief Gets the current error message. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * @remarks This function should be called during an stt error callback. If not, the error as operation failure will be returned. \n - * If the function succeeds, @a err_msg must be released using free() when it is no longer required. - * + * @remarks This function should be called during an stt error callback. If not, the error as operation failure will be returned. + * If the function succeeds, @a err_msg must be released using free() when it is no longer required. * @param[in] stt The STT handle * @param[out] err_msg The current error message - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_OPERATION_FAILED Operation failure - * * @see stt_set_error_cb() * @see stt_unset_error_cb() */ int stt_get_error_message(stt_h stt, char** err_msg); + /** * @brief Checks whether the recognition type is supported. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - * @param[out] support The result status @c true = supported, @c false = not supported - * - * @return 0 on success, otherwise a negative error value + * @param[out] support The result status @c true = supported, + * @c false = not supported + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_is_recognition_type_supported(stt_h stt, const char* type, bool* support); + /** * @brief Sets the silence detection. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] type The option type - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED_FEATURE Not supported feature of current engine * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_set_silence_detection(stt_h stt, stt_option_silence_detection_e type); + /** * @brief Sets the sound to start recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks Sound file type should be wav type. - * * @param[in] stt The STT handle * @param[in] filename The sound file path - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_set_start_sound(stt_h stt, const char* filename); + /** * @brief Unsets the sound to start recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_unset_start_sound(stt_h stt); + /** * @brief Sets the sound to stop recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks Sound file type should be wav type. - * * @param[in] stt The STT handle * @param[in] filename The sound file path - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_set_stop_sound(stt_h stt, const char* filename); + /** * @brief Unsets the sound to stop recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_READY. */ int stt_unset_stop_sound(stt_h stt); + /** * @brief Starts recording and recognition asynchronously. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @remarks This function starts recording in the STT service and sending recording data to engine. \n - * This work continues until stt_stop(), stt_cancel() or silence detected by engine. - * + * @remarks This function starts recording in the STT service and sending recording data to engine. + * This work continues until stt_stop(), stt_cancel() or silence detected by engine. * @param[in] stt The STT handle * @param[in] language The language selected from stt_foreach_supported_languages() * @param[in] type The type for recognition (e.g. #STT_RECOGNITION_TYPE_FREE, #STT_RECOGNITION_TYPE_FREE_PARTIAL) - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state @@ -808,27 +773,25 @@ int stt_unset_stop_sound(stt_h stt); * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied * @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished - * * @pre The state should be #STT_STATE_READY. - * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). \n - * If this function succeeds, the STT state will be #STT_STATE_RECORDING. - * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_RECORDING. - * + * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). + * If this function succeeds, the STT state will be #STT_STATE_RECORDING. + * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_RECORDING. * @see stt_stop() * @see stt_cancel() * @see stt_state_changed_cb() */ int stt_start(stt_h stt, const char* language, const char* type); + /** * @brief Finishes the recording and starts recognition processing in engine asynchronously. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state @@ -838,31 +801,28 @@ int stt_start(stt_h stt, const char* language, const char* type); * @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished * @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished * @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - * * @pre The state should be #STT_STATE_RECORDING. - * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). \n - * If this function succeeds, the STT state will be #STT_STATE_PROCESSING. \n - * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_PROCESSING. - * After processing of engine, stt_result_cb() is called. - * + * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). + * If this function succeeds, the STT state will be #STT_STATE_PROCESSING. + * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_PROCESSING. + * After processing of engine, stt_result_cb() is called. * @see stt_start() * @see stt_cancel() * @see stt_state_changed_cb() */ int stt_stop(stt_h stt); + /** * @brief Cancels processing recognition and recording asynchronously. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @remarks This function cancels recording and engine cancels recognition processing. \n - * After successful cancel, stt_state_changed_cb() is called otherwise if error is occurred, stt_error_cb() is called. - * + * @remarks This function cancels recording and engine cancels recognition processing. + * After successful cancel, stt_state_changed_cb() is called otherwise if error is occurred, stt_error_cb() is called. * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state @@ -872,284 +832,257 @@ int stt_stop(stt_h stt); * @retval #STT_ERROR_IN_PROGRESS_TO_READY Progress to ready is not finished * @retval #STT_ERROR_IN_PROGRESS_TO_RECORDING Progress to recording is not finished * @retval #STT_ERROR_IN_PROGRESS_TO_PROCESSING Progress to processing is not finished - * * @pre The state should be #STT_STATE_RECORDING or #STT_STATE_PROCESSING. - * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). \n - * If this function succeeds, the STT state will be #STT_STATE_READY. - * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_READY. - * + * @post It will invoke stt_state_changed_cb(), if you register a callback with stt_state_changed_cb(). + * If this function succeeds, the STT state will be #STT_STATE_READY. + * If you call this function again before state changes, you will receive STT_ERROR_IN_PROGRESS_TO_READY. * @see stt_start() * @see stt_stop() * @see stt_state_changed_cb() */ int stt_cancel(stt_h stt); + /** * @brief Gets the microphone volume during recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[out] volume Recording volume - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_RECORDING. - * * @see stt_start() */ int stt_get_recording_volume(stt_h stt, float* volume); + /** * @brief Retrieves the time stamp of the current recognition result using the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks This function should be called in stt_recognition_result_cb(). - * After stt_recognition_result_cb(), result data is NOT valid. - * + * After stt_recognition_result_cb(), result data is NOT valid. * @param[in] stt The STT handle * @param[in] callback The callback function to invoke * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_OPERATION_FAILED Operation failure * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre This function should be called in stt_recognition_result_cb(). * @post This function invokes stt_result_time_cb() repeatedly for getting time information. - * * @see stt_result_time_cb() * @see stt_recognition_result_cb() */ int stt_foreach_detailed_result(stt_h stt, stt_result_time_cb callback, void* user_data); + /** * @brief Registers a callback function to get the recognition result. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_recognition_result_cb() * @see stt_unset_recognition_result_cb() */ int stt_set_recognition_result_cb(stt_h stt, stt_recognition_result_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_recognition_result_cb() */ int stt_unset_recognition_result_cb(stt_h stt); + /** * @brief Registers a callback function to be called when STT state changes. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_state_changed_cb() * @see stt_unset_state_changed_cb() */ int stt_set_state_changed_cb(stt_h stt, stt_state_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_state_changed_cb() */ int stt_unset_state_changed_cb(stt_h stt); + /** * @brief Registers a callback function to be called when an error occurred. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_error_cb() * @see stt_unset_error_cb() */ int stt_set_error_cb(stt_h stt, stt_error_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_error_cb() */ int stt_unset_error_cb(stt_h stt); + /** * @brief Registers a callback function to detect the default language change. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_default_language_changed_cb() * @see stt_unset_default_language_changed_cb() */ int stt_set_default_language_changed_cb(stt_h stt, stt_default_language_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported * @retval #STT_ERROR_PERMISSION_DENIED Permission denied - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_default_language_changed_cb() */ int stt_unset_default_language_changed_cb(stt_h stt); + /** * @brief Registers a callback function to detect the engine change. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @param[in] stt The STT handle * @param[in] callback The callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_engine_changed_cb() * @see stt_unset_engine_changed_cb() */ int stt_set_engine_changed_cb(stt_h stt, stt_engine_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif - * * @param[in] stt The STT handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #STT_ERROR_NONE Successful * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STT_ERROR_INVALID_STATE Invalid state * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported - * * @pre The state should be #STT_STATE_CREATED. - * * @see stt_set_engine_changed_cb() */ int stt_unset_engine_changed_cb(stt_h stt); @@ -1159,9 +1092,11 @@ int stt_unset_engine_changed_cb(stt_h stt); } #endif + /** * @}@} */ + #endif /* __STT_H__ */ diff --git a/include/stte.h b/include/stte.h index 0f448f3..82bf87c 100755 --- a/include/stte.h +++ b/include/stte.h @@ -11,125 +11,143 @@ * limitations under the License. */ + #ifndef __STT_ENGINE_MAIN_H__ #define __STT_ENGINE_MAIN_H__ + #include + /** * @addtogroup CAPI_UIX_STTE_MODULE * @{ */ + #ifdef __cplusplus extern "C" { #endif + /** -* @brief Enumerations for error codes. +* @brief Enumeration for error codes. * @since_tizen 3.0 */ typedef enum { - STTE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - STTE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ - STTE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ - STTE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - STTE_ERROR_NETWORK_DOWN = TIZEN_ERROR_NETWORK_DOWN, /**< Network down(Out of network) */ - STTE_ERROR_INVALID_STATE = TIZEN_ERROR_STT | 0x01, /**< Invalid state */ - STTE_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_STT | 0x02, /**< Invalid language */ - STTE_ERROR_OPERATION_FAILED = TIZEN_ERROR_STT | 0x04, /**< Operation failed */ - STTE_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_STT | 0x05, /**< Not supported feature */ - STTE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ - STTE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - STTE_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x06 /**< Recording timed out */ + STTE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + STTE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ + STTE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ + STTE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + STTE_ERROR_NETWORK_DOWN = TIZEN_ERROR_NETWORK_DOWN, /**< Network down(Out of network) */ + STTE_ERROR_INVALID_STATE = TIZEN_ERROR_STT | 0x01, /**< Invalid state */ + STTE_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_STT | 0x02, /**< Invalid language */ + STTE_ERROR_OPERATION_FAILED = TIZEN_ERROR_STT | 0x04, /**< Operation failed */ + STTE_ERROR_NOT_SUPPORTED_FEATURE = TIZEN_ERROR_STT | 0x05, /**< Not supported feature */ + STTE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ + STTE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + STTE_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x06 /**< Recording timed out */ } stte_error_e; + /** -* @brief Enumerations for audio type. +* @brief Enumeration for audio type. * @since_tizen 3.0 */ typedef enum { - STTE_AUDIO_TYPE_PCM_S16_LE = 0, /**< Signed 16bit audio type, Little endian */ - STTE_AUDIO_TYPE_PCM_U8 /**< Unsigned 8bit audio type */ + STTE_AUDIO_TYPE_PCM_S16_LE = 0, /**< Signed 16bit audio type, Little endian */ + STTE_AUDIO_TYPE_PCM_U8 /**< Unsigned 8bit audio type */ } stte_audio_type_e; + /** -* @brief Enumerations for callback event. +* @brief Enumeration for callback event. * @since_tizen 3.0 */ typedef enum { - STTE_RESULT_EVENT_FINAL_RESULT = 0, /**< Event when either the full matched or the final result is delivered */ - STTE_RESULT_EVENT_PARTIAL_RESULT, /**< Event when the partial matched result is delivered */ - STTE_RESULT_EVENT_ERROR /**< Event when the recognition has failed */ + STTE_RESULT_EVENT_FINAL_RESULT = 0, /**< Event when either the full matched or the final result is delivered */ + STTE_RESULT_EVENT_PARTIAL_RESULT, /**< Event when the partial matched result is delivered */ + STTE_RESULT_EVENT_ERROR /**< Event when the recognition has failed */ } stte_result_event_e; + /** -* @brief Enumerations for result time callback event. +* @brief Enumeration for result time callback event. * @since_tizen 3.0 */ typedef enum { - STTE_RESULT_TIME_EVENT_BEGINNING = 0, /**< Event when the token is beginning type */ - STTE_RESULT_TIME_EVENT_MIDDLE, /**< Event when the token is middle type */ - STTE_RESULT_TIME_EVENT_END /**< Event when the token is end type */ + STTE_RESULT_TIME_EVENT_BEGINNING = 0, /**< Event when the token is beginning type */ + STTE_RESULT_TIME_EVENT_MIDDLE, /**< Event when the token is middle type */ + STTE_RESULT_TIME_EVENT_END /**< Event when the token is end type */ } stte_result_time_event_e; + /** -* @brief Enumerations for speech status. +* @brief Enumeration for speech status. * @since_tizen 3.0 */ typedef enum { - STTE_SPEECH_STATUS_BEGINNING_POINT_DETECTED = 0, /**< Beginning point of speech is detected */ - STTE_SPEECH_STATUS_END_POINT_DETECTED /**< End point of speech is detected */ + STTE_SPEECH_STATUS_BEGINNING_POINT_DETECTED = 0, /**< Beginning point of speech is detected */ + STTE_SPEECH_STATUS_END_POINT_DETECTED /**< End point of speech is detected */ } stte_speech_status_e; + /** * @brief Definition for free form dictation and default type. * @since_tizen 3.0 */ #define STTE_RECOGNITION_TYPE_FREE "stt.recognition.type.FREE" + /** * @brief Definition for free form dictation continuously. * @since_tizen 3.0 */ #define STTE_RECOGNITION_TYPE_FREE_PARTIAL "stt.recognition.type.FREE.PARTIAL" + /** * @brief Definition for None message. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_NONE "stt.result.message.none" + /** * @brief Definition for failed recognition because the speech started too soon. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_ERROR_TOO_SOON "stt.result.message.error.too.soon" + /** * @brief Definition for failed recognition because the speech started too short. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_ERROR_TOO_SHORT "stt.result.message.error.too.short" + /** * @brief Definition for failed recognition because the speech started too long. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_ERROR_TOO_LONG "stt.result.message.error.too.long" + /** * @brief Definition for failed recognition because the speech started too quiet to listen. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_ERROR_TOO_QUIET "stt.result.message.error.too.quiet" + /** * @brief Definition for failed recognition because the speech started too loud to listen. * @since_tizen 3.0 */ #define STTE_RESULT_MESSAGE_ERROR_TOO_LOUD "stt.result.message.error.too.loud" + /** * @brief Definition for failed recognition because the speech started too fast to listen. * @since_tizen 3.0 @@ -141,21 +159,17 @@ typedef enum { * @brief Called when STT engine provides the time stamp of result to the engine service user. * @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. * @since_tizen 3.0 -* * @remarks This callback function is called in stte_foreach_result_time_cb() for adding time information. -* @a user_data must be transferred from stte_foreach_result_time_cb(). -* +* @a user_data must be transferred from stte_foreach_result_time_cb(). * @param[in] index The result index * @param[in] event The token event * @param[in] text The result text * @param[in] start_time The time started speaking the result text * @param[in] end_time The time finished speaking the result text * @param[in] user_data The user data passed from stte_foreach_result_time_cb() -* -* @return @c true to continue with the next iteration of the loop \n @c false to break out of the loop -* +* @return @c true to continue with the next iteration of the loop +* @c false to break out of the loop * @pre stte_send_result() should be called. -* * @see stte_send_result() * @see stte_foreach_result_time_cb() */ @@ -167,240 +181,226 @@ typedef bool (*stte_result_time_cb)(int index, stte_result_time_event_e event, c * @brief Called when STT engine informs the engine service user about whole supported language list. * @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. * @since_tizen 3.0 -* * @remarks This callback function is called in stte_foreach_supported_langs_cb() to inform the whole supported language list. -* @a user_data must be transferred from stte_foreach_supported_langs_cb(). -* +* @a user_data must be transferred from stte_foreach_supported_langs_cb(). * @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -* followed by ISO 639-1 for the two-letter language code \n -* For example, "ko_KR" for Korean, "en_US" for American English +* followed by ISO 639-1 for the two-letter language code +* For example, "ko_KR" for Korean, "en_US" for American English * @param[in] user_data The user data passed from stte_foreach_supported_langs_cb() -* -* @return @c true to continue with the next iteration of the loop \n @c false to break out of the loop -* +* @return @c true to continue with the next iteration of the loop +* @c false to break out of the loop * @pre stte_foreach_supported_langs_cb() will invoke this callback function. -* * @see stte_foreach_supported_langs_cb() */ typedef bool (*stte_supported_language_cb)(const char* language, void* user_data); + /** * @brief Called when the engine service user initializes STT engine. * @details This callback function is called by the engine service user to request for STT engine to be started. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_INVALID_STATE Already initialized * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @see stte_deinitialize_cb() */ typedef int (*stte_initialize_cb)(void); + /** * @brief Called when the engine service user deinitializes STT engine * @details This callback function is called by the engine service user to request for STT engine to be deinitialized. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* NOTE that the engine may be terminated automatically. -* When this callback function is invoked, the release of resources is necessary. -* -* @return 0 on success, otherwise a negative error value +* NOTE that the engine may be terminated automatically. +* When this callback function is invoked, the release of resources is necessary. +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_STATE Not initialized -* * @see stte_initialize_cb() */ typedef int (*stte_deinitialize_cb)(void); + /** * @brief Called when the engine service user gets the whole supported language list. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* In this function, the engine service user's callback function 'stte_supported_language_cb()' is invoked repeatedly for getting all supported languages, and @a user_data must be transferred to 'stte_supported_language_cb()'. -* If 'stte_supported_language_cb()' returns @c false, it should be stopped to call 'stte_supported_language_cb()'. -* +* In this function, the engine service user's callback function 'stte_supported_language_cb()' is invoked repeatedly for getting all supported languages, and @a user_data must be transferred to 'stte_supported_language_cb()'. +* If 'stte_supported_language_cb()' returns @c false, it should be stopped to call 'stte_supported_language_cb()'. * @param[in] callback The callback function * @param[in] user_data The user data which must be passed to the callback function 'stte_supported_language_cb()' -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_INVALID_STATE Not initialized -* -* @post This callback function invokes stte_supported_language_cb() repeatedly for getting supported languages. -* +* @post This callback function invokes stte_supported_language_cb() repeatedly for getting supported languages. * @see stte_supported_language_cb() */ typedef int (*stte_foreach_supported_langs_cb)(stte_supported_language_cb callback, void* user_data); + /** * @brief Called when the engine service user checks whether the corresponding language is valid or not in STT engine. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* * @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -* followed by ISO 639-1 for the two-letter language code \n -* For example, "ko_KR" for Korean, "en_US" for American English -* @param[out] is_valid A variable for checking whether the corresponding language is valid or not. \n @c true to be valid, @c false to be invalid. -* -* @return 0 on success, otherwise a negative error value +* followed by ISO 639-1 for the two-letter language code +* For example, "ko_KR" for Korean, "en_US" for American English +* @param[out] is_valid A variable for checking whether the corresponding language is valid or not. +* @c true to be valid, +* @c false to be invalid +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* * @see stte_foreach_supported_languages_cb() */ typedef int (*stte_is_valid_language_cb)(const char* language, bool* is_valid); + /** * @brief Called when the engine service user checks whether STT engine supports silence detection. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* -* @return @c true to support silence detection, @c false not to support silence detection -* +* @return @c true to support silence detection, +* @c false not to support silence detection * @see stte_set_silence_detection_cb() */ typedef bool (*stte_support_silence_detection_cb)(void); + /** * @brief Called when the engine service user checks whether STT engine supports the corresponding recognition type. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* * @param[in] type The type for recognition (e.g. #STTE_RECOGNITION_TYPE_FREE) -* @param[out] is_supported A variable for checking whether STT engine supports the corresponding recognition type. \n @c true to support recognition type, @c false not to support recognition type. -* -* @return 0 on success, otherwise a negative error value +* @param[out] is_supported A variable for checking whether STT engine supports the corresponding recognition type. +* @c true to support recognition type, +* @c false not to support recognition type +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * */ typedef int (*stte_support_recognition_type_cb)(const char* type, bool* is_supported); + /** * @brief Called when the engine service user gets the proper recording format of STT engine. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* The recording format is used for creating the recorder. -* -* @param[out] types The format used by the recorder. -* @param[out] rate The sample rate used by the recorder. -* @param[out] channels The number of channels used by the recorder. -* -* @return 0 on success, otherwise a negative error value +* The recording format is used for creating the recorder. +* @param[out] types The format used by the recorder +* @param[out] rate The sample rate used by the recorder +* @param[out] channels The number of channels used by the recorder +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_STATE Not initialized */ typedef int (*stte_get_recording_format_cb)(stte_audio_type_e* types, int* rate, int* channels); + /** * @brief Called when the engine service user sets the silence detection. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* If the engine service user sets this option as 'TRUE', STT engine will detect the silence (EPD) and send the callback event about it. -* -* @param[in] is_set A variable for setting the silence detection. \n @c true to detect the silence, @c false not to detect the silence. -* -* @return 0 on success, otherwise a negative error value +* If the engine service user sets this option as 'TRUE', STT engine will detect the silence (EPD) and send the callback event about it. +* @param[in] is_set A variable for setting the silence detection. +* @c true to detect the silence, +* @c false not to detect the silence +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_STATE Not initialized * @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature */ typedef int (*stte_set_silence_detection_cb)(bool is_set); + /** * @brief Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine. * @details This callback function is called when the engine service user requests for STT engine to check the application's agreement about using the engine. -* According to the need, the engine developer can provide some user interfaces to check the agreement. +* According to the need, the engine developer can provide some user interfaces to check the agreement. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* If the STT engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. \n @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. -* NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. -* +* If the STT engine developer wants not to check the agreement, the developer has need to return proper values as @a is_agreed in accordance with the intention. @c true if the developer regards that every application agreed the usage of the engine, @c false if the developer regards that every application disagreed. +* NOTE that, however, there may be any legal issue unless the developer checks the agreement. Therefore, we suggest that the engine developers should provide a function to check the agreement. * @param[in] appid The Application ID -* @param[out] is_agreed A variable for checking whether the application agreed to use STT engine or not. \n @c true to agree, @c false to disagree. -* -* @return 0 on success, otherwise a negative error value +* @param[out] is_agreed A variable for checking whether the application agreed to use STT engine or not. +* @c true to agree, +* @c false to disagree +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_STATE Not initialized * @retval #STTE_ERROR_NOT_SUPPORTED_FEATURE Not supported feature */ typedef int (*stte_check_app_agreed_cb)(const char* appid, bool* is_agreed); + /** * @brief Called when the engine service user checks whether STT engine needs the application's credential. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* -* @return @c true if STT engine needs the application's credential, otherwise @c false +* @return @c true if STT engine needs the application's credential, +* otherwise @c false */ typedef bool (*stte_need_app_credential_cb)(void); + /** * @brief Called when the engine service user gets the result time information(stamp). * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* In this function, the engine service user's callback function 'stte_result_time_cb()' is invoked repeatedly for sending the time information to the engine service user, and @a user_data must be transferred to 'stte_result_time_cb()'. -* If 'stte_result_time_cb()' returns @c false, it should be stopped to call 'stte_result_time_cb()'. -* @a time_info is transferred from stte_send_result(). The type of @a time_info is up to the STT engine developer. -* +* In this function, the engine service user's callback function 'stte_result_time_cb()' is invoked repeatedly for sending the time information to the engine service user, and @a user_data must be transferred to 'stte_result_time_cb()'. +* If 'stte_result_time_cb()' returns @c false, it should be stopped to call 'stte_result_time_cb()'. +* @a time_info is transferred from stte_send_result(). The type of @a time_info is up to the STT engine developer. * @param[in] time_info The time information * @param[in] callback The callback function * @param[in] user_data The user data which must be passed to the callback function 'stte_result_time_cb()' -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_INVALID_STATE Not initialized -* * @pre stte_send_result() will invoke this function. -* @post This function invokes stte_result_time_cb() repeatedly for getting result time information. -* +* @post This function invokes stte_result_time_cb() repeatedly for getting result time information. * @see stte_result_time_cb() */ typedef int (*stte_foreach_result_time_cb)(void* time_info, stte_result_time_cb callback, void* user_data); + /** * @brief Called when the engine service user starts to recognize the recording data. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* In this callback function, STT engine must transfer the recognition result and @a user_data to the engine service user using stte_send_result(). -* Also, if STT engine needs the application's credential, it sets the credential granted to the application. -* +* In this callback function, STT engine must transfer the recognition result and @a user_data to the engine service user using stte_send_result(). +* Also, if STT engine needs the application's credential, it sets the credential granted to the application. * @param[in] language The language is specified as an ISO 3166 alpha-2 two letter country-code -* followed by ISO 639-1 for the two-letter language code \n -* For example, "ko_KR" for Korean, "en_US" for American English +* followed by ISO 639-1 for the two-letter language code +* For example, "ko_KR" for Korean, "en_US" for American English * @param[in] type The recognition type. (e.g. #STTE_RECOGNITION_TYPE_FREE) * @param[in] appid The Application ID * @param[in] credential The credential granted to the application -* @param[in] user_data The user data to be passed to the callback function. -* -* @return 0 on success, otherwise a negative error value +* @param[in] user_data The user data to be passed to the callback function +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_INVALID_STATE Invalid state * @retval #STTE_ERROR_INVALID_LANGUAGE Invalid language * @retval #STTE_ERROR_OPERATION_FAILED Operation failure * @retval #STTE_ERROR_NETWORK_DOWN Out of network -* * @pre The engine is not in recognition processing. -* * @see stte_set_recording_data_cb() * @see stte_stop_cb() * @see stte_cancel_cb() @@ -408,49 +408,44 @@ typedef int (*stte_foreach_result_time_cb)(void* time_info, stte_result_time_cb */ typedef int (*stte_start_cb)(const char* language, const char* type, const char* appid, const char* credential, void *user_data); + /** * @brief Called when the engine service user sets and sends the recording data for speech recognition. * @details This callback function is called by the engine service user to send the recording data to STT engine. -* The engine receives the recording data and uses for speech recognition. +* The engine receives the recording data and uses for speech recognition. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* Also, this function should be returned immediately after recording data copy. -* +* Also, this function should be returned immediately after recording data copy. * @param[in] data The recording data * @param[in] length The length of recording data -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_INVALID_STATE Invalid state * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre stte_start_cb() should succeed. * @post If the engine supports partial result, stte_send_result() should be invoked. -* * @see stte_start_cb() * @see stte_cancel_cb() * @see stte_stop_cb() */ typedef int (*stte_set_recording_data_cb)(const void* data, unsigned int length); + /** * @brief Called when the engine service user stops to recognize the recording data. * @details This callback function is called by the engine service user to stop recording and to get the recognition result. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_STATE Invalid state * @retval #STTE_ERROR_OPERATION_FAILED Operation failure * @retval #STTE_ERROR_NETWORK_DOWN Out of network -* * @pre stte_start_cb() should succeed. * @post After processing of the engine, stte_send_result() must be called. -* * @see stte_start_cb() * @see stte_set_recording_data_cb() * @see stte_cancel_cb() @@ -458,142 +453,130 @@ typedef int (*stte_set_recording_data_cb)(const void* data, unsigned int length) */ typedef int (*stte_stop_cb)(void); + /** * @brief Called when the engine service user cancels to recognize the recording data. * @details This callback function is called by the engine service user to cancel to recognize the recording data. -* Also, when starting the recorder is failed, this function is called. +* Also, when starting the recorder is failed, this function is called. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* -* @return 0 on success, otherwise a negative error value. +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful. * @retval #STTE_ERROR_INVALID_STATE Invalid state. -* * @pre STT engine is in recognition processing or recording. -* * @see stte_start_cb() * @see stte_stop_cb() */ typedef int (*stte_cancel_cb)(void); + /** * @brief Called when the engine service user requests the basic information of STT engine. * @since_tizen 3.0 -* * @remarks This callback function is mandatory and must be registered using stte_main(). -* The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. -* In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. -* Therefore, @a engine_setting must be transferred to the engine service user. -* +* The allocated @a engine_uuid, @a engine_name, and @a engine_setting will be released internally. +* In order to upload the engine at Tizen Appstore, both a service app and a ui app are necessary. +* Therefore, @a engine_setting must be transferred to the engine service user. * @param[out] engine_uuid UUID of engine * @param[out] engine_name Name of engine -* @param[out] engine_setting The engine setting application(ui app)'s app id +* @param[out] engine_setting The engine setting application(ui app)'s app ID * @param[out] use_network A variable for checking whether the network is used or not -* -* @return 0 on success, otherwise a negative error code on failure +* @return @c 0 on success, +* otherwise a negative error code on failure * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* */ typedef int (*stte_get_info_cb)(char** engine_uuid, char** engine_name, char** engine_setting, bool* use_network); + /** * @brief Called when STT engine receives the private data from the engine service user. * @details This callback function is called when the engine service user sends the private data to STT engine. * @since_tizen 3.0 -* * @remarks This callback function is optional and is registered using stte_set_private_data_set_cb(). -* -* @param[in] key The key field of private data. -* @param[in] data The data field of private data. -* -* @return 0 on success, otherwise a negative error value +* @param[in] key The key field of private data +* @param[in] data The data field of private data +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @see stte_private_data_requested_cb() * @see stte_set_private_data_set_cb() */ typedef int (*stte_private_data_set_cb)(const char* key, const char* data); + /** * @brief Called when STT engine provides the engine service user with the private data. * @details This callback function is called when the engine service user gets the private data from STT engine. * @since_tizen 3.0 -* * @remarks This callback function is optional and is registered using stte_set_private_data_requested_cb(). -* -* @param[out] key The key field of private data. -* @param[out] data The data field of private data. -* -* @return 0 on success, otherwise a negative error value +* @param[out] key The key field of private data +* @param[out] data The data field of private data +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @see stte_private_data_set_cb() * @see stte_set_private_data_requested_cb() */ typedef int (*stte_private_data_requested_cb)(const char* key, char** data); + /** * @brief A structure for the STT engine functions. * @details This structure contains essential callback functions for operating STT engine. * @since_tizen 3.0 -* * @remarks These functions are mandatory for operating STT engine. Therefore, all functions MUST be implemented. */ typedef struct { - int version; /**< The version of the structure 'stte_request_callback_s' */ - stte_get_info_cb get_info; /**< Called when the engine service user requests the basic information of STT engine */ + int version; /**< The version of the structure 'stte_request_callback_s' */ + stte_get_info_cb get_info; /**< Called when the engine service user requests the basic information of STT engine */ - stte_initialize_cb initialize; /**< Called when the engine service user initializes STT engine */ - stte_deinitialize_cb deinitialize; /**< Called when the engine service user deinitializes STT engine */ + stte_initialize_cb initialize; /**< Called when the engine service user initializes STT engine */ + stte_deinitialize_cb deinitialize; /**< Called when the engine service user deinitializes STT engine */ - stte_foreach_supported_langs_cb foreach_langs; /**< Called when the engine service user gets the whole supported language list */ - stte_is_valid_language_cb is_valid_lang; /**< Called when the engine service user checks whether the corresponding language is valid or not*/ - stte_support_silence_detection_cb support_silence; /**< Called when the engine service user checks whether STT engine supports silence detection*/ - stte_support_recognition_type_cb support_recognition_type; /**< Called when the engine service user checks whether STT engine supports the corresponding recognition type */ - stte_get_recording_format_cb get_audio_format; /**< Called when the engine service user gets the proper recording format of STT engine */ - stte_foreach_result_time_cb foreach_result_time; /**< Called when the engine service user gets the result time information(stamp) */ + stte_foreach_supported_langs_cb foreach_langs; /**< Called when the engine service user gets the whole supported language list */ + stte_is_valid_language_cb is_valid_lang; /**< Called when the engine service user checks whether the corresponding language is valid or not*/ + stte_support_silence_detection_cb support_silence; /**< Called when the engine service user checks whether STT engine supports silence detection*/ + stte_support_recognition_type_cb support_recognition_type; /**< Called when the engine service user checks whether STT engine supports the corresponding recognition type */ + stte_get_recording_format_cb get_audio_format; /**< Called when the engine service user gets the proper recording format of STT engine */ + stte_foreach_result_time_cb foreach_result_time; /**< Called when the engine service user gets the result time information(stamp) */ - stte_set_silence_detection_cb set_silence_detection; /**< Called when the engine service user sets the silence detection */ + stte_set_silence_detection_cb set_silence_detection; /**< Called when the engine service user sets the silence detection */ - stte_start_cb start; /**< Called when the engine service user starts to recognize the recording data */ - stte_set_recording_data_cb set_recording; /**< Called when the engine service user sets and sends the recording data for speech recognition */ - stte_stop_cb stop; /**< Called when the engine service user stops to recognize the recording data */ - stte_cancel_cb cancel; /**< Called when the engine service user cancels to recognize the recording data */ + stte_start_cb start; /**< Called when the engine service user starts to recognize the recording data */ + stte_set_recording_data_cb set_recording; /**< Called when the engine service user sets and sends the recording data for speech recognition */ + stte_stop_cb stop; /**< Called when the engine service user stops to recognize the recording data */ + stte_cancel_cb cancel; /**< Called when the engine service user cancels to recognize the recording data */ - stte_check_app_agreed_cb check_app_agreed; /**< Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine */ - stte_need_app_credential_cb need_app_credential; /**< Called when the engine service user checks whether STT engine needs the application's credential */ + stte_check_app_agreed_cb check_app_agreed; /**< Called when the engine service user requests for STT engine to check whether the application agreed the usage of STT engine */ + stte_need_app_credential_cb need_app_credential; /**< Called when the engine service user checks whether STT engine needs the application's credential */ } stte_request_callback_s; + /** * @brief Main function for Speech-To-Text (STT) engine. * @details This function is the main function for operating STT engine. * @since_tizen 3.0 -* * @privlevel public * @privilege %http://tizen.org/privilege/recorder -* * @remarks The service_app_main() should be used for working the engine after this function. -* * @param[in] argc The argument count(original) * @param[in] argv The argument(original) * @param[in] callback The structure of engine request callback function -* -* @return This function returns zero on success, or negative with error code on failure +* @return This function returns @c zero on success, +* or negative with error code on failure * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @see stte_request_callback_s -* * @code #include @@ -682,31 +665,27 @@ int stte_main(int argc, char** argv, stte_request_callback_s *callback); /** * @brief Sends the recognition result to the engine service user. * @since_tizen 3.0 -* * @remarks This API is used in stte_set_recording_data_cb() and stte_stop_cb(), when STT engine sends the recognition result to the engine service user. -* This function is called in the following situations; 1) after stte_stop_cb() is called, 2) the end point of speech is detected from recording, or 3) partial result is occurred. -* The recognition result and @a user_data must be transferred to the engine service user through this function. -* Also, @a time_info must be transferred to stte_foreach_result_time_cb(). The type of @a time_info is up to the STT engine developer. -* +* This function is called in the following situations; 1) after stte_stop_cb() is called, 2) the end point of speech is detected from recording, or 3) partial result is occurred. +* The recognition result and @a user_data must be transferred to the engine service user through this function. +* Also, @a time_info must be transferred to stte_foreach_result_time_cb(). The type of @a time_info is up to the STT engine developer. * @param[in] event The result event * @param[in] type The recognition type (e.g. #STTE_RECOGNITION_TYPE_FREE, #STTE_RECOGNITION_TYPE_FREE_PARTIAL) * @param[in] result Result texts * @param[in] result_count Result text count * @param[in] msg Engine message (e.g. #STTE_RESULT_MESSAGE_NONE, #STTE_RESULT_MESSAGE_ERROR_TOO_SHORT) * @param[in] time_info The time information -* @param[in] user_data The user data passed from stte_start_cb() -* -* @return 0 on success, otherwise a negative error value +* @param[in] user_data The user data passed from stte_start_cb() +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied +* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre The stte_main() function should be invoked before this function is called. -* stte_stop_cb() will invoke this function. +* stte_stop_cb() will invoke this function. * @post This function invokes stte_foreach_result_time_cb(). -* * @see stte_start_cb() * @see stte_set_recording_data_cb() * @see stte_stop_cb() @@ -718,56 +697,50 @@ int stte_send_result(stte_result_event_e event, const char* type, const char** r /** * @brief Sends the error to the engine service user. -* @details The following error codes can be delivered.\n -* #STTE_ERROR_NONE,\n -* #STTE_ERROR_OUT_OF_MEMORY,\n -* #STTE_ERROR_IO_ERROR,\n -* #STTE_ERROR_INVALID_PARAMETER,\n -* #STTE_ERROR_NETWORK_DOWN,\n -* #STTE_ERROR_INVALID_STATE,\n -* #STTE_ERROR_INVALID_LANGUAGE,\n -* #STTE_ERROR_OPERATION_FAILED,\n -* #STTE_ERROR_NOT_SUPPORTED_FEATURE,\n -* #STTE_ERROR_NOT_SUPPORTED,\n -* #STTE_ERROR_PERMISSION_DENIED,\n -* #STTE_ERROR_RECORDING_TIMED_OUT.\n -* +* @details The following error codes can be delivered. +* #STTE_ERROR_NONE, +* #STTE_ERROR_OUT_OF_MEMORY, +* #STTE_ERROR_IO_ERROR, +* #STTE_ERROR_INVALID_PARAMETER, +* #STTE_ERROR_NETWORK_DOWN, +* #STTE_ERROR_INVALID_STATE, +* #STTE_ERROR_INVALID_LANGUAGE, +* #STTE_ERROR_OPERATION_FAILED, +* #STTE_ERROR_NOT_SUPPORTED_FEATURE, +* #STTE_ERROR_NOT_SUPPORTED, +* #STTE_ERROR_PERMISSION_DENIED, +* #STTE_ERROR_RECORDING_TIMED_OUT. * @since_tizen 3.0 -* * @param[in] error The error reason * @param[in] msg The error message -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied +* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre The stte_main() function should be invoked before this function is called. */ int stte_send_error(stte_error_e error, const char* msg); + /** * @brief Sends the speech status to the engine service user when STT engine notifies the change of the speech status. * @since_tizen 3.0 -* * @remarks This API is invoked when STT engine wants to notify the change of the speech status anytime. -* NOTE that this API can be invoked for recognizing the speech. -* +* NOTE that this API can be invoked for recognizing the speech. * @param[in] status The status of speech (e.g. STTE_SPEECH_STATUS_START_POINT_DETECTED or STTE_SPEECH_STATUS_END_POINT_DETECTED) * @param[in] user_data The user data passed from the start function. -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied +* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre The stte_main() function should be invoked before this function is called. -* stte_start_cb() and stte_set_recording_data_cb() will invoke this function. -* +* stte_start_cb() and stte_set_recording_data_cb() will invoke this function. * @see stte_start_cb() * @see stte_set_recording_data_cb() */ @@ -777,59 +750,51 @@ int stte_send_speech_status(stte_speech_status_e status, void* user_data); /** * @brief Sets a callback function for setting the private data. * @since_tizen 3.0 -* * @privlevel public * @privilege %http://tizen.org/privilege/recorder -* * @remarks The stte_private_data_set_cb() function is called when the engine service user sends the private data. -* * @param[in] callback_func stte_private_data_set event callback function -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied +* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre The stte_main() function should be invoked before this function is called. -* * @see stte_private_data_set_cb() */ int stte_set_private_data_set_cb(stte_private_data_set_cb callback_func); + /** * @brief Sets a callback function for requesting the private data. * @since_tizen 3.0 -* * @privlevel public * @privilege %http://tizen.org/privilege/recorder -* * @remarks The stte_private_data_requested_cb() function is called when the engine service user gets the private data from STT engine. -* * @param[in] callback_func stte_private_data_requested event callback function -* -* @return 0 on success, otherwise a negative error value +* @return @c 0 on success, +* otherwise a negative error value * @retval #STTE_ERROR_NONE Successful * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter -* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied +* @retval #STTE_ERROR_PERMISSION_DENIED Permission denied * @retval #STTE_ERROR_NOT_SUPPORTED Not supported * @retval #STTE_ERROR_OPERATION_FAILED Operation failure -* * @pre The stte_main() function should be invoked before this function is called. -* * @see stte_private_data_requested_cb() */ int stte_set_private_data_requested_cb(stte_private_data_requested_cb callback_func); - #ifdef __cplusplus } #endif + /** * @}@} */ + #endif /* __STT_ENGINE_MAIN_H__ */