* @brief Enumerations of state.
*/
typedef enum {
- STT_STATE_READY = 0, /**< 'READY' state */
+ STT_STATE_CREATED = 0, /**< 'CREATED' state */
+ STT_STATE_READY, /**< 'READY' state */
STT_STATE_RECORDING, /**< 'RECORDING' state */
STT_STATE_PROCESSING /**< 'PROCESSING' state*/
}stt_state_e;
/**
+* @brief Enumerations of profanity type.
+*/
+typedef enum {
+ STT_OPTION_PROFANITY_FALSE = 0, /**< Profanity type - False */
+ STT_OPTION_PROFANITY_TRUE = 1, /**< Profanity type - True */
+ STT_OPTION_PROFANITY_AUTO = 2 /**< Profanity type - Auto */
+}stt_option_profanity_e;
+
+/**
+* @brief Enumerations of punctuation type.
+*/
+typedef enum {
+ STT_OPTION_PUNCTUATION_FALSE = 0, /**< Punctuation type - False */
+ STT_OPTION_PUNCTUATION_TRUE = 1, /**< Punctuation type - True */
+ STT_OPTION_PUNCTUATION_AUTO = 2 /**< Punctuation type - Auto */
+}stt_option_punctuation_e;
+
+/**
* @brief Enumerations of silence detection type.
*/
typedef enum {
*
* @pre An application registers this callback using stt_set_state_changed_cb() to detect changing state.
*
-* @see stt_start()
-* @see stt_stop()
-* @see stt_cancel()
-* @see stt_result_cb()
* @see stt_set_state_changed_cb()
* @see stt_unset_state_changed_cb()
*/
*
* @param[in] stt The handle for STT
* @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n
-* 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. \n
+* For example, "ko_KR" for Korean, "en_US" for American English.
* @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.
/**
-* @brief Creates a handle for STT and connects daemon.
+* @brief Creates a handle for STT.
*
* @param[out] stt The handle for STT
*
* @return 0 on success, otherwise a negative error value
* @retval #STT_ERROR_NONE Successful
-* @retval #STT_ERROR_TIMED_OUT The daemon is blocked or do not exist
-* @retval #STT_ERROR_ENGINE_NOT_FOUND No available engine \n Engine should be installed
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
-* @retval #STT_ERROR_OUT_OF_MEMORY Out of memory
* @retval #STT_ERROR_OPERATION_FAILED Operation failure
*
+* @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 the handle and disconnects the daemon.
+* @brief Destroys the handle.
*
* @param[in] stt The handle for STT
*
int stt_destroy(stt_h stt);
/**
+* @brief Connects the daemon.
+*
+* @param[in] stt The handle for STT
+*
+* @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
+*
+* @pre The state should be #STT_STATE_CREATED.
+* @post If this function is called, the STT state will be #STT_STATE_READY.
+*
+* @see stt_unprepare()
+*/
+int stt_prepare(stt_h stt);
+
+/**
+* @brief Disconnects the daemon.
+*
+* @param[in] stt The handle for STT
+*
+* @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
+*
+* @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.
*
* @param[in] stt The handle for STT
*
* @param[in] stt The handle for STT
* @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n
-* 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. \n
+* For example, "ko_KR" for Korean, "en_US" for American English.
*
* @return 0 on success, otherwise a negative error value
* @retval #STT_ERROR_NONE Successful
int stt_is_partial_result_supported(stt_h stt, bool* partial_result);
/**
+* @brief Sets profanity filter.
+*
+* @param[in] stt The handle for STT
+* @param[in] type The option type
+*
+* @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_FEATURE Not supported feature of current engine
+*
+* @pre The state should be #STT_STATE_READY.
+*/
+int stt_set_profanity_filter(stt_h stt, stt_option_profanity_e type);
+
+/**
+* @brief Sets punctuation override.
+*
+* @param[in] stt The handle for STT
+* @param[in] type The option type
+*
+* @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_FEATURE Not supported feature of current engine
+*
+* @pre The state should be #STT_STATE_READY.
+*/
+int stt_set_punctuation_override(stt_h stt, stt_option_punctuation_e type);
+
+/**
* @brief Sets silence detection.
*
* @param[in] stt The handle for STT
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_result_cb()
* @see stt_unset_result_cb()
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_set_result_cb()
*/
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
+* @pre The state should be #STT_STATE_CREATED.
+*
* @see stt_partial_result_cb()
* @see stt_unset_partial_result_cb()
*/
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_set_partial_result_cb()
*/
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_state_changed_cb()
* @see stt_unset_state_changed_cb()
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_set_state_changed_cb()
*/
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_error_cb()
* @see stt_unset_error_cb()
* @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #STT_ERROR_INVALID_STATE Invalid state
*
-* @pre The state should be #STT_STATE_READY.
+* @pre The state should be #STT_STATE_CREATED.
*
* @see stt_set_error_cb()
*/