/*
- * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* @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 daemon */
- 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_e;
+ 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 daemon */
+ 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_NO_SPEECH = TIZEN_ERROR_STT | 0x06, /**< No speech while recording */
+ STT_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_STT | 0x07, /**< Progress to ready is not finished */
+ STT_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_STT | 0x08, /**< Progress to recording is not finished */
+ STT_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_STT | 0x09, /**< Progress to processing is not finished */
+ STT_ERROR_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x10, /**< Recording timed out */
+ STT_ERROR_SERVICE_RESET = TIZEN_ERROR_STT | 0x11 /**< Service reset */
+} stt_error_e;
/**
* @brief Definition for free form dictation and default type.
STT_STATE_READY = 1, /**< 'READY' state */
STT_STATE_RECORDING = 2, /**< 'RECORDING' state */
STT_STATE_PROCESSING = 3 /**< 'PROCESSING' state*/
-}stt_state_e;
+} stt_state_e;
/**
* @brief Enumeration for result event.
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;
+} stt_result_event_e;
/**
* @brief Enumeration for result time callback event.
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;
+} stt_result_time_event_e;
/**
* @brief Enumeration for silence detection type.
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;
+} stt_option_silence_detection_e;
/**
* @brief A structure of STT handler.
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
+ *
+ * @param[in] stt The STT handle
+ * @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 bool (*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
* @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.
*
* @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()
*/
* @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.
* @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.
*
* @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.
*
int stt_set_engine(stt_h stt, const char* engine_id);
/**
+ * @brief Sets the app credential.
+ * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/recorder
+ *
+ * @param[in] stt The STT handle
+ * @param[in] credential The app credential
+ *
+ * @return 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
+ * @retval #STT_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @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.
+ * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ *
+ * @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
+ * @retval #STT_ERROR_NONE Successful
+ * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #STT_ERROR_INVALID_STATE Invalid state
+ * @retval #STT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported
+ * @retval #STT_ERROR_TIMED_OUT No answer from the daemon
+ *
+ * @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.
+ * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ *
+ * @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
+ * @retval #STT_ERROR_NONE Successful
+ * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #STT_ERROR_INVALID_STATE Invalid state
+ * @retval #STT_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported
+ * @retval #STT_ERROR_TIMED_OUT No answer from the daemon
+ *
+ * @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 daemon asynchronously.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @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
* @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.
* @return 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
* @retval #STT_ERROR_OPERATION_FAILED Operation failure
* @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.
*
* @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()
*/
* @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()
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
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/recorder
+ * @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.
+ *
+ * @param[in] stt The STT handle
+ * @param[out] err_msg The current error message
+ *
+ * @return 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
+ * @retval #STT_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @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
* @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.
*/
* @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.
*/
* @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.
*/
* @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.
*/
* @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.
*/
* @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.
*/
* @retval #STT_ERROR_RECORDER_BUSY Recorder busy
* @retval #STT_ERROR_INVALID_LANGUAGE Invalid language
* @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.
*
* @see stt_stop()
* @see stt_cancel()
* @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
+ * @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.
*
* @see stt_start()
* @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
+ * @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.
*
* @see stt_start()
* @see stt_stop()
* @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.
*
* @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.
* @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.
*
* @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.
*
* @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.
*
* @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.
*
* @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.
*
* @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.
*
* @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.
*
* @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.
*
*/
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
+ * @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
+ * @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_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
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/recorder
+ *
+ * @param[in] stt The STT handle
+ *
+ * @return 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_engine_changed_cb()
+*/
+int stt_unset_engine_changed_cb(stt_h stt);
+
+
#ifdef __cplusplus
}
#endif