* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @remarks If the function succeeds, @a vc must be released with vc_deinitialize().
- * @return @c 0 on success,
+ * @remarks If the function succeeds, vc must be released with vc_deinitialize().
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_OUT_OF_MEMORY Out of memory
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @retval #VC_ERROR_OPERATION_FAILED Operation failure
* @retval #VC_ERROR_PERMISSION_DENIED Permission denied
* @retval #VC_ERROR_NOT_SUPPORTED Not supported
- * @see vc_deinitialize()
+ * @see vc_initialize()
*/
int vc_deinitialize(void);
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @remark If the function succeeds, @a language must be released with free() by you when you no longer need it.
+ * @remarks If the function succeeds, @a language must be released with free() by you when you no longer need it.
* @param[out] language A 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
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[out] state The current state
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[out] state The current state
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* Therefore, the user can not set any commands same with the system commands.
* The @a vc_sys_cmd_list must be released using free() when it is no longer required.
* @param[out] vc_sys_cmd_list System command list handle
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized.
* This function should be called before vc_set_command_list().
* @param[in] name Invocation name that an application wants to be invoked by
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @param[in] disp_text Text to be displayed on the screen
* @param[in] utt_text Text to be spoken
* @param[in] auto_start A variable for setting whether the dialog session will be restarted automatically or not
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* The matched commands of command list should be set and they should include type and command text at least.
* @param[in] vc_cmd_list Command list handle
* @param[in] type Command type
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
* @param[in] type Command type
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to get recognition result
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to register
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to register
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to register
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to register
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
* @privilege %http://tizen.org/privilege/recorder
* @param[in] callback Callback function to register
* @param[in] user_data The user data to be passed to the callback function
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/recorder
- * @return @c 0 on success,
+ * @return @c 0 on success,
* otherwise a negative error value
* @retval #VC_ERROR_NONE Successful
* @retval #VC_ERROR_INVALID_STATE Invalid state
int vc_unset_error_cb(void);
+/**
+ * @brief Requests to send TTS streaming data, asynchronously.
+ * @details Using this function, the developer can request text to speech to the framework.
+ * When the developer requests the TTS with @a language, VC engine will send PCM data which is synthesized using VC engine's own persona.
+ * If @a to_vc_manager is true, the synthesized PCM data will be delivered to the VC manager, otherwise it will be delivered to the VC client
+ * For example, if @a text is "Alarm is set as 7 PM" and @a to_vc_manager is true, the PCM data corresponding "Alarm is set as 7 PM" will be delivered to VC manager client,
+ * and then it will be spoken in VC manager. If @a to_vc_manager is false, you will receive PCM data through the vc_tts_streaming_cb() callback function if it was set using vc_tts_set_streaming_cb().
+ * This function is executed asynchronously, so if there is an error while synthesizing, vc_error_cb() will be called.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @param[in] text The text to be requested for TTS
+ * @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] to_vc_manager The value for selection between VC client and VC manager\n
+ * If @c true, the synthesized PCM data will be delivered to the VC manager, otherwise it will be delivered to the VC client
+ * @param[out] utt_id The utterance id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @retval #VC_ERROR_OPERATION_FAILED Operation failure
+ * @pre The state should be #VC_STATE_READY.
+ * @see vc_tts_cancel()
+ */
+int vc_tts_request(const char* text, const char* language, bool to_vc_manager, int* utt_id);
+
+
+/**
+ * @brief Requests to cancel TTS streaming data.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @param[in] utt_id The utterance id
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #VC_STATE_READY.
+ * @see vc_tts_request()
+ */
+int vc_tts_cancel(int utt_id);
+
+
+/**
+ * @brief Gets the TTS audio details.
+ * @details Using this function, the developer can get details of synthesized audio data which is requested by vc_tts_request() function.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @param[out] rate The audio sampling rate
+ * @param[out] channel The audio channel
+ * @param[out] audio_type The audio type
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #VC_STATE_READY.
+ */
+int vc_tts_get_synthesized_audio_details(int* rate, vc_audio_channel_e* channel, vc_audio_type_e* audio_type);
+
+
+/**
+ * @brief Sets the TTS streaming callback function.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @param[in] callback The callback function
+ * @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 #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #VC_STATE_INITIALIZED.
+ */
+int vc_tts_set_streaming_cb(vc_tts_streaming_cb callback, void* user_data);
+
+
+/**
+ * @brief Unsets the TTS streaming callback function.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #VC_STATE_INITIALIZED.
+ */
+int vc_tts_unset_streaming_cb(void);
+
+
+/**
+ * @brief Sets the TTS utterance status callback function.
+ * @details Using this function, the developer can set the utterance status callback to be called
+ * when the VC manager client starts or stops playing TTS PCM data which was requested to be synthesized with the vc_tts_request() function.
+ * This function is called when @a to_vc_manager in the vc_tts_request() function call is true.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @param[in] callback The callback function
+ * @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 #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @retval #VC_ERROR_OPERATION_FAILED Operation failure
+ * @pre The state should be #VC_STATE_INITIALIZED.
+ */
+int vc_tts_set_utterance_status_cb(vc_tts_utterance_status_cb callback, void* user_data);
+
+
+/**
+ * @brief Unsets the TTS utterance status callback function.
+ * @since_tizen 5.5
+ * @privlevel @partner
+ * @privilege %http://tizen.org/privilege/voicecontrol.tts
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #VC_ERROR_NONE Successful
+ * @retval #VC_ERROR_NOT_SUPPORTED Not supported
+ * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #VC_ERROR_INVALID_STATE Invalid state
+ * @pre The state should be #VC_STATE_INITIALIZED.
+ */
+int vc_tts_unset_utterance_status_cb(void);
+
+
#ifdef __cplusplus
}
#endif
{
#endif
-typedef enum {
- VC_TTS_EVENT_FAIL = -1, /**< Failed */
- VC_TTS_EVENT_START = 1, /**< Start event */
- VC_TTS_EVENT_CONTINUE = 2, /**< Continue event */
- VC_TTS_EVENT_FINISH = 3 /**< Finish event */
-} vc_tts_event_e;
-
-typedef enum {
- VC_TTS_UTTERANCE_NONE = -1,
- VC_TTS_UTTERANCE_STARTED = 1,
- VC_TTS_UTTERANCE_COMPLETED = 2,
- VC_TTS_UTTERANCE_CANCELED = 3
-} vc_tts_utterance_status_e;
-
/**
* @brief Called when client gets the asr recognition result from vc-daemon.
typedef bool (*vc_asr_result_cb)(vc_result_event_e event, const char* result, void *user_data);
/**
- * @brief Called when client gets TTS streaming data from vc engine service.
- * @since_tizen 4.0
- *
- * @remarks The @a buffer must be released with free() by you when you no longer need it.
- *
- * @param[in] event The TTS event
- * @param[in] buffer The TTS streaming data
- * @param[in] len The length of the TTS streaming data
- * @param[in] utt_id The utterance id
- * @param[in] user_data The user data passed from the callback registration function
- *
- * @pre An application registers callback function using vc_tts_set_streaming_cb().
- *
- * @see vc_tts_set_streaming_cb()
- * @see vc_tts_unset_streaming_cb()
- */
-typedef void (*vc_tts_streaming_cb)(vc_tts_event_e event, char* buffer, int len, int utt_id, void *user_data);
-
-/**
- * @brief Called when client gets TTS utterance status.
- * @since_tizen 4.0
- *
- * @param[in] utt_id The utterance id
- * @param[in] status The TTS utterance status (e.g. #VC_TTS_UTTERANCE_STARTED, #VC_TTS_UTTERANCE_COMPLETED, and so on)
- *
- * @pre An application registers callback function using vc_tts_set_utterance_status_cb().
- *
- * @see vc_tts_set_utterance_status_cb()
- * @see vc_tts_unset_utterance_status_cb()
- */
-typedef void (*vc_tts_utterance_status_cb)(int utt_id, vc_tts_utterance_status_e status);
-
-/**
* @brief Sets command list from file.
* @since_tizen 3.0
* @privlevel public
*/
int vc_prepare_sync(void);
-/**
- * @brief Requests to send TTS streaming data.
- * @since_tizen 4.0
- *
- * @param[in] text The text to be requested for TTS
- * @param[in] language The language for TTS
- * @param[in] to_vcm A value whether the TTS request is from vc client or vc manager
- * @param[in] utt_id The utterance id
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_READY.
- *
- * @see vc_tts_cancel()
- */
-int vc_tts_request(const char* text, const char* language, bool to_vcm, int* utt_id);
-
-/**
- * @brief Requests to cancel TTS streaming data.
- * @since_tizen 4.0
- *
- * @param[in] utt_id The utterance id
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_READY.
- *
- * @see vc_tts_request()
- */
-int vc_tts_cancel(int utt_id);
-
-/**
- * @brief Gets TTS audio format.
- * @since_tizen 4.0
- *
- * @param[out] rate The audio sampling rate
- * @param[out] channel The audio channel
- * @param[out] audio_type The audio type
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_READY.
- */
-int vc_tts_get_audio_format(int* rate, vc_audio_channel_e* channel, vc_audio_type_e* audio_type);
-
-/**
- * @brief Sets TTS streaming callback function.
- * @since_tizen 4.0
- *
- * @param[in] callback The callback function
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_INITIALIZED.
- */
-int vc_tts_set_streaming_cb(vc_tts_streaming_cb callback, void* user_data);
-
-/**
- * @brief Unsets TTS streaming callback function.
- * @since_tizen 4.0
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_INITIALIZED.
- */
-int vc_tts_unset_streaming_cb(void);
-
-/**
- * @brief Sets TTS utterance status callback function.
- * @since_tizen 4.0
- *
- * @param[in] callback The callback function
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_INITIALIZED.
- */
-int vc_tts_set_utterance_status_cb(vc_tts_utterance_status_cb callback, void* user_data);
-
-/**
- * @brief Unsets TTS utterance status callback function.
- * @since_tizen 4.0
- *
- * @return 0 on success, otherwise a negative error value
- * @retval #VC_ERROR_NONE Successful
- * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #VC_ERROR_INVALID_STATE Invalid state
- * @retval #VC_ERROR_PERMISSION_DENIED Permission denied
- * @retval #VC_ERROR_NOT_SUPPORTED Not supported
- *
- * @pre The state should be #VC_STATE_INITIALIZED.
- */
-int vc_tts_unset_utterance_status_cb(void);
-
#ifdef __cplusplus
}