From: dyamy-lee Date: Tue, 10 Sep 2024 04:53:07 +0000 (+0900) Subject: Add space and descriptions for ACR APIs X-Git-Tag: accepted/tizen/unified/20240930.043752~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7882094a39444a708ec71d11902f7e9568aa5439;p=platform%2Fcore%2Fuifw%2Ftts.git Add space and descriptions for ACR APIs Change-Id: I6ba85bf068c0da19470ce74bbeb5bf6743cf3bae --- diff --git a/include/tts.h b/include/tts.h index 97f76ee8..0c72554d 100644 --- a/include/tts.h +++ b/include/tts.h @@ -273,10 +273,10 @@ typedef void (*tts_error_cb)(tts_h tts, int utt_id, tts_error_e reason, void* us * @pre tts_foreach_supported_voices() will invoke this callback function. * @see tts_foreach_supported_voices() */ -typedef bool(*tts_supported_voice_cb)(tts_h tts, const char* language, int voice_type, void* user_data); +typedef bool (*tts_supported_voice_cb)(tts_h tts, const char* language, int voice_type, void* user_data); /** - * @brief Called to retrieve the supported personal vocie. + * @brief Called to retrieve the supported personal voice. * @since_tizen 9.0 * @param[in] tts The TTS handle * @param[in] language Language specified as 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) @@ -289,7 +289,7 @@ typedef bool(*tts_supported_voice_cb)(tts_h tts, const char* language, int voice * @pre tts_foreach_supported_personal_voices() will invoke this callback function. * @see tts_foreach_supported_personal_voices() */ -typedef bool(*tts_supported_personal_voice_cb)(tts_h tts, const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data); +typedef bool (*tts_supported_personal_voice_cb)(tts_h tts, const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data); /** * @brief Called when the default voice is changed. @@ -530,13 +530,17 @@ int tts_foreach_supported_voices(tts_h tts, tts_supported_voice_cb callback, voi /** * @brief Retrieves all supported personal voices of the current engine using callback function. - * @since_tiaen 9.0 + * @since_tizen 9.0 * @param[in] tts The TTS handle * @param[in] callback The callback function to invoke * @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 #TTS_ERROR_NONE Successful + * @retval #TTS_ERROR_NOT_SUPPORTED TTS NOT supported + * @retval #TTS_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #TTS_ERROR_ENGINE_NOT_FOUND Engine not found + * @retval #TTS_ERROR_OPERATION_FAILED Operation failure * @post This function invokes tts_supported_personal_voice_cb() repeatedly for getting personal voices. */ int tts_foreach_supported_personal_voices(tts_h tts, tts_supported_personal_voice_cb callback, void* user_data); diff --git a/include/ttse.h b/include/ttse.h index 6577f3ee..cffe6791 100755 --- a/include/ttse.h +++ b/include/ttse.h @@ -103,6 +103,11 @@ typedef enum { */ #define TTSE_VOICE_TYPE_CHILD 3 + +/** +* @brief Definition for personal voice type. +* @since_tizen 9.0 +*/ #define TTSE_VOICE_TYPE_PERSONAL 4 /** @@ -707,8 +712,8 @@ int ttse_set_activated_mode_changed_cb(ttse_activated_mode_changed_cb callback); /** * @brief Sets a callback function to be called when a personal TTS id is set. * @since_tizen 9.0 -* @remarks The ttse_set_personal_tts_id_cb() function is called when the activated TTS modes are changed. -* @param[in] callback ttse_activated_mode_changed event callback function +* @remarks The ttse_set_personal_tts_id_cb() function is called when the engine service user sends the ptts_id. +* @param[in] callback ttse_set_personal_tts_id event callback function * @return @c 0 on success, * otherwise a negative error value * @retval #TTSE_ERROR_NONE Successful @@ -716,11 +721,31 @@ int ttse_set_activated_mode_changed_cb(ttse_activated_mode_changed_cb callback); * @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #TTSE_ERROR_INVALID_STATE Not initialized * @pre The ttse_main() function should be invoked before this function is called. -* @see ttse_activated_mode_changed_cb() -* @see ttse_get_activated_mode() +* @see ttse_set_personal_tts_id_cb() */ int ttse_set_personal_tts_id_set_cb(ttse_set_personal_tts_id_cb callback); + +/** +* @brief Sends the personal voice's information to the engine service user. +* @since_tizen 9.0 +* @remarks This API is called when TTS engine sends the personal voice's information to the engine service user. +* The personal voice's information and @a user_data must be transferred to the engine service user through this function. +* @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. +* For example, "ko_KR" for Korean, "en_US" for American English +* @param[in] unique_id The unique_id is used as ptts_id. +* @param[in] display_name The display_name is saved from user. It can be used client's side. +* @param[in] device_name The device_name is the name of the device where personal voice is stored. +* @param[in] user_data The user data which contains TTS engine name or NULL +* @return @c 0 on success, +* otherwise a negative error value +* @retval #TTSE_ERROR_NONE Successful +* @retval #TTSE_ERROR_NOT_SUPPORTED Not supported +* @retval #TTSE_ERROR_INVALID_PARAMETER Invalid parameter +* @retval #TTSE_ERROR_OPERATION_FAILED Operation failure +* @pre The ttse_main() function doesn't have to be invoked before this function is called. +*/ int ttse_send_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);