} tts_service_state_e;
-/**
- * @brief Enumeration for synthesized pcm event.
- * @since_tizen 7.5
-*/
-typedef enum {
- TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< 'Error' event */
- TTS_SYNTHESIZED_PCM_EVENT_START, /**< 'Started' event */
- TTS_SYNTHESIZED_PCM_EVENT_CONTINUE, /**< 'Finished' event */
- TTS_SYNTHESIZED_PCM_EVENT_FINISH, /**< 'Finished' event */
-} tts_synthesized_pcm_event_e;
-
-
/**
* @brief Definition for automatic speaking speed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
typedef void (*tts_service_state_changed_cb)(tts_h tts, tts_service_state_e previous, tts_service_state_e current, void* user_data);
-/**
- * @brief Called when the synthesized pcm data is come from the engine.
- * @since_tizen 7.5
- * @remarks The @a tts handle should not be destroyed in the callback.
- * @param[in] tts The TTS handle, the same handle for which the callback was set.
- * @param[in] event The event type
- * @param[in] buffer The synthesized pcm data
- * @param[in] buffer_size The size of the buffer
- * @param[in] user_data The user data passed from the callback registration function
- * @pre An application registers this callback using tts_set_synthesized_pcm_cb() to get pcm data.
- * @see tts_set_synthesized_pcm_cb()
- * @see tts_unset_synthesized_pcm_cb()
- */
-typedef void (*tts_synthesized_pcm_cb)(tts_h tts, tts_synthesized_pcm_event_e event, char* buffer, int buffer_size, void *user_data);
-
-
/**
* @brief Creates a handle for TTS.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
int tts_unset_service_state_changed_cb(tts_h tts);
-
-/**
- * @brief Sets the default to be called when the synthesized pcm data is recieved.
- * @since_tizen 7.5
- * @param[in] tts The TTS handle
- * @param callback The callback function to register
- * @param user_data The user data to be passed to the callback function
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #TTS_ERROR_NONE Successful
- * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #TTS_ERROR_INVALID_STATE Invalid state
- * @pre The TTS state should be #TTS_STATE_CREATED.
- * @see tts_synthesized_pcm_cb()
- * @see tts_unset_synthesized_pcm_cb()
- */
-int tts_set_synthesized_pcm_cb(tts_h tts, tts_synthesized_pcm_cb callback, void* user_data);
-
-
-/**
- * @brief Unsets the callback function.
- * @since_tizen 7.5
- * @param tts The TTS handle
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #TTS_ERROR_NONE Successful
- * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
- * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #TTS_ERROR_INVALID_STATE Invalid state
- * @pre The TTS state should be #TTS_STATE_CREATED.
- * @see tts_set_synthesized_pcm_cb()
- */
-int tts_unset_synthesized_pcm_cb(tts_h tts);
-
#ifdef __cplusplus
}
#endif
{
#endif
+
+/**
+ * @brief Enumeration for synthesized pcm event.
+ * @since_tizen 7.5
+*/
+typedef enum {
+ TTS_SYNTHESIZED_PCM_EVENT_FAIL = -1, /**< 'Error' event */
+ TTS_SYNTHESIZED_PCM_EVENT_START, /**< 'Started' event */
+ TTS_SYNTHESIZED_PCM_EVENT_CONTINUE, /**< 'Finished' event */
+ TTS_SYNTHESIZED_PCM_EVENT_FINISH, /**< 'Finished' event */
+} tts_synthesized_pcm_event_e;
+
+
/**
* @brief Definition for TTS interrupt mode
*/
#define TTS_MODE_INTERRUPT 3
+
+/**
+ * @brief Called when the synthesized pcm data is come from the engine.
+ * @since_tizen 7.5
+ * @remarks The @a tts handle should not be destroyed in the callback.
+ * @param[in] tts The TTS handle, the same handle for which the callback was set.
+ * @param[in] event The event type
+ * @param[in] buffer The synthesized pcm data
+ * @param[in] buffer_size The size of the buffer
+ * @param[in] user_data The user data passed from the callback registration function
+ * @pre An application registers this callback using tts_set_synthesized_pcm_cb() to get pcm data.
+ * @see tts_set_synthesized_pcm_cb()
+ * @see tts_unset_synthesized_pcm_cb()
+ */
+typedef void (*tts_synthesized_pcm_cb)(tts_h tts, tts_synthesized_pcm_event_e event, char* buffer, int buffer_size, void *user_data);
+
+
/**
* @brief Sets server tts.
* @details Using this API, the application can ask server tts with a credential.
int tts_stop_pcm(tts_h tts);
+/**
+ * @brief Sets the default to be called when the synthesized pcm data is recieved.
+ * @since_tizen 7.5
+ * @param[in] tts The TTS handle
+ * @param callback The callback function to register
+ * @param user_data The user data to be passed to the callback function
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #TTS_ERROR_NONE Successful
+ * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
+ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TTS_ERROR_INVALID_STATE Invalid state
+ * @pre The TTS state should be #TTS_STATE_CREATED.
+ * @see tts_synthesized_pcm_cb()
+ * @see tts_unset_synthesized_pcm_cb()
+ */
+int tts_set_synthesized_pcm_cb(tts_h tts, tts_synthesized_pcm_cb callback, void* user_data);
+
+
+/**
+ * @brief Unsets the callback function.
+ * @since_tizen 7.5
+ * @param tts The TTS handle
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #TTS_ERROR_NONE Successful
+ * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported
+ * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TTS_ERROR_INVALID_STATE Invalid state
+ * @pre The TTS state should be #TTS_STATE_CREATED.
+ * @see tts_set_synthesized_pcm_cb()
+ */
+int tts_unset_synthesized_pcm_cb(tts_h tts);
+
+
#ifdef __cplusplus
}