/**
* @brief Enumeration for error codes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
STT_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
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_RECORDING_TIMED_OUT = TIZEN_ERROR_STT | 0x06, /**< Recording timed out (Since 3.0) */
+ STT_ERROR_NO_SPEECH = TIZEN_ERROR_STT | 0x07, /**< No speech while recording (Since 3.0) */
+ STT_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_STT | 0x08, /**< Progress to ready is not finished (Since 3.0) */
+ STT_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_STT | 0x09, /**< Progress to recording is not finished (Since 3.0) */
+ STT_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_STT | 0x10, /**< Progress to processing is not finished (Since 3.0) */
+ STT_ERROR_SERVICE_RESET = TIZEN_ERROR_STT | 0x11 /**< Service reset (Since 3.0) */
} stt_error_e;
/**
* @brief Definition for free form dictation and default type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#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
+ * @since_tizen 2.3
*/
#define STT_RESULT_MESSAGE_ERROR_TOO_FAST "stt.result.message.error.too.fast"
/**
* @brief Enumeration for state.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
STT_STATE_CREATED = 0, /**< 'CREATED' state */
/**
* @brief Enumeration for result event.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
STT_RESULT_EVENT_FINAL_RESULT = 0, /**< Event when the recognition full or last result is ready */
/**
* @brief Enumeration for result time callback event.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
STT_RESULT_TIME_EVENT_BEGINNING = 0, /**< Event when the token is beginning type */
/**
* @brief Enumeration for silence detection type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
STT_OPTION_SILENCE_DETECTION_FALSE = 0, /**< Silence detection type - False */
/**
* @brief A structure of STT handle.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
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
+ * @since_tizen 2.3
* @param[in] stt The STT handle
* @param[in] engine_id Engine ID
* @param[in] engine_name Engine name
/**
* @brief Called when STT gets the recognition result from the engine.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks After stt_stop() is called, silence is detected from recording, or partial result is occurred, this function is called.
* @param[in] stt The STT handle
* @param[in] event The result event
/**
* @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
+ * @since_tizen 2.3
* @param[in] stt The STT handle
* @param[in] index The result index
* @param[in] event The token event
/**
* @brief Called when the state of STT is changed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] stt The STT handle
* @param[in] previous A previous state
* @param[in] current A current state
/**
* @brief Called when an error occurs.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @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
/**
* @brief Called to retrieve the supported languages.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @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
/**
* @brief Called when the default language is changed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] stt The STT handle
* @param[in] previous_language A previous language
* @param[in] current_language A current language
/**
* @brief Called when the engine is changed.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @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
/**
* @brief Creates a STT handle.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks If the function succeeds, @a stt handle must be released with stt_destroy().
/**
* @brief Destroys a STT handle.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Retrieves supported engine information using a callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Gets the current engine ID.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks If the function is success, @a engine_id must be released using free().
/**
* @brief Sets the engine ID.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @privilege %http://tizen.org/privilege/appmanager.launch
* @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.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @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.
* @param[in] stt The STT handle
* 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
+ * @since_tizen 3.0
* @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
* @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.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @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
/**
* @brief Connects the STT service asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Disconnects the STT service.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Retrieves all supported languages of current engine using callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Gets the default language set by the user.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @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.
/**
* @brief Gets the current STT state.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Gets the current error message.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @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
/**
* @brief Checks whether the recognition type is supported.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets the silence detection.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets the sound to start recording.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks Sound file type should be wav type.
/**
* @brief Unsets the sound to start recording.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets the sound to stop recording.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks Sound file type should be wav type.
/**
* @brief Unsets the sound to stop recording.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Starts recording and recognition asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks This function starts recording in the STT service and sending recording data to engine.
/**
* @brief Finishes the recording and starts recognition processing in engine asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks This function can only stop recording started by stt_start().
/**
* @brief Cancels processing recognition and recording asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks This function cancels recording and engine cancels recognition processing.
/**
* @brief Gets the microphone volume during recording.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @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
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @remarks This function should be called in stt_recognition_result_cb().
/**
* @brief Sets a callback function to get the recognition result.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets a callback function to be called when STT state changes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets a callback function to be called when an error occurred.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets a callback function to detect the default language change.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] stt The STT handle
/**
* @brief Sets a callback function to detect the engine change.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @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
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 3.0 @elseif WEARABLE 2.3.2 @endif
+ * @since_tizen 3.0
* @param[in] stt The STT handle
* @return @c 0 on success,
* otherwise a negative error value