#include "tts_internal.h"
+#define MAX_SILENT_DURATION 5000
+
static int g_feature_enabled = -1;
RETVM_IF(false == tts_core_check_screen_reader(client), TTS_ERROR_SCREEN_READER_OFF, "[ERROR] Screen reader option is not available");
RETVM_IF(false == tts_core_check_credential(client), TTS_ERROR_PERMISSION_DENIED, "[ERROR] Do not have app credential for this engine");
+ if (duration_in_msec < 0) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to add silent. The duration of silent should be above than zero.");
+ return TTS_ERROR_INVALID_PARAMETER;
+ }
+
+ if (duration_in_msec > MAX_SILENT_DURATION) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to add silent. The max duration for silent is 5000 msec");
+ return TTS_ERROR_INVALID_PARAMETER;
+ }
+
int ret = tts_core_add_silent_utterance(client, duration_in_msec, utt_id);
if (TTS_ERROR_NONE != ret) {
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to request add silent. ret(%s)", tts_core_covert_error_code(ret));
/**
* @brief Add silence for the specified amount of time
* @since_tizen 9.0
+ * @remarks The maximum silent time is 5000 msec. If you want to perform a silent time of more than 5000 msec, call this function several times.
* @param[in] tts The TTS handle
* @param[in] duration_in_ms The duration of the silence
* @param[out] utt_id The utterance ID passed to the callback function