From: sungwook79.park Date: Thu, 5 Sep 2024 07:17:11 +0000 (+0900) Subject: [UTC][TTS][ACR-1840] Add TCs for new APIs about Synthesis parameter and Silence utterance X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9295db13a31a742a655640da5166cdfb508df377;p=test%2Ftct%2Fnative%2Fapi.git [UTC][TTS][ACR-1840] Add TCs for new APIs about Synthesis parameter and Silence utterance Change-Id: I068a80d5b748d061ace6927c19b3fb975ce2a6bf Signed-off-by: sungwook79.park --- diff --git a/src/utc/tts/public.list b/src/utc/tts/public.list index b86f3efc5..12ad3db6e 100755 --- a/src/utc/tts/public.list +++ b/src/utc/tts/public.list @@ -37,6 +37,19 @@ tts_set_engine_changed_cb tts_unset_engine_changed_cb tts_set_service_state_changed_cb tts_unset_service_state_changed_cb +tts_add_silence_utterance +tts_synthesis_parameter_create +tts_synthesis_parameter_destroy +tts_synthesis_parameter_set_language +tts_synthesis_parameter_set_voice_type +tts_synthesis_parameter_set_personal_voice +tts_synthesis_parameter_set_speed +tts_synthesis_parameter_set_pitch +tts_synthesis_parameter_set_volume +tts_synthesis_parameter_set_background_volume_ratio +tts_get_pitch_range +tts_get_volume_range +tts_add_text_with_synthesis_parameter ttse_main ttse_terminate ttse_get_speed_range diff --git a/src/utc/tts/tct-tts-core.c b/src/utc/tts/tct-tts-core.c index 586390e48..a84e1ff66 100755 --- a/src/utc/tts/tct-tts-core.c +++ b/src/utc/tts/tct-tts-core.c @@ -167,7 +167,7 @@ static void app_control(app_control_h app_control, void *data) FILE *fres = fopen("/tmp/tcresult","w"); fprintf(fres, "%d", result); fclose(fres); - if (0 == strncmp(func_name, "utc_tts_unset_engine_changed_cb_n1", strlen(func_name)) || 0 == strncmp("utc_ttse_", func_name, strlen("utc_ttse_"))) { + if (0 == strncmp(func_name, "utc_tts_add_text_with_synthesis_parameter_n3", strlen(func_name)) || 0 == strncmp("utc_ttse_", func_name, strlen("utc_ttse_"))) { dlog_print(DLOG_INFO, "NativeTCT", "%s must be exited", func_name); service_app_exit(); } diff --git a/src/utc/tts/tct-tts-core_mobile.h b/src/utc/tts/tct-tts-core_mobile.h index d5864d570..efdab78c3 100755 --- a/src/utc/tts/tct-tts-core_mobile.h +++ b/src/utc/tts/tct-tts-core_mobile.h @@ -193,6 +193,43 @@ extern int utc_tts_set_playing_mode_p(void); extern int utc_tts_set_playing_mode_p1(void); extern int utc_tts_set_playing_mode_n(void); extern int utc_tts_set_playing_mode_n1(void); +extern int utc_tts_add_silence_utterance_p(void); +extern int utc_tts_add_silence_utterance_n(void); +extern int utc_tts_add_silence_utterance_n2(void); +extern int utc_tts_add_silence_utterance_n3(void); +extern int utc_tts_synthesis_parameter_create_p(void); +extern int utc_tts_synthesis_parameter_create_n(void); +extern int utc_tts_synthesis_parameter_destroy_p(void); +extern int utc_tts_synthesis_parameter_destroy_n(void); +extern int utc_tts_synthesis_parameter_set_language_p(void); +extern int utc_tts_synthesis_parameter_set_language_n(void); +extern int utc_tts_synthesis_parameter_set_language_n2(void); +extern int utc_tts_synthesis_parameter_set_voice_type_p(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n2(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n2(void); +extern int utc_tts_synthesis_parameter_set_speed_p(void); +extern int utc_tts_synthesis_parameter_set_speed_n(void); +extern int utc_tts_synthesis_parameter_set_speed_n2(void); +extern int utc_tts_synthesis_parameter_set_pitch_p(void); +extern int utc_tts_synthesis_parameter_set_pitch_n(void); +extern int utc_tts_synthesis_parameter_set_pitch_n2(void); +extern int utc_tts_synthesis_parameter_set_volume_p(void); +extern int utc_tts_synthesis_parameter_set_volume_n(void); +extern int utc_tts_synthesis_parameter_set_volume_n2(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_p(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n2(void); +extern int utc_tts_get_pitch_range_p(void); +extern int utc_tts_get_pitch_range_n(void); +extern int utc_tts_get_volume_range_p(void); +extern int utc_tts_get_volume_range_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_p(void); +extern int utc_tts_add_text_with_synthesis_parameter_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_n2(void); +extern int utc_tts_add_text_with_synthesis_parameter_n3(void); extern int utc_ttse_main_p(void); extern int utc_ttse_main_n(void); extern int utc_ttse_main_n1(void); @@ -385,6 +422,43 @@ testcase tc_array[] = { {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_p",utc_tts_add_silence_utterance_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n",utc_tts_add_silence_utterance_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n2",utc_tts_add_silence_utterance_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n3",utc_tts_add_silence_utterance_n3,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_p",utc_tts_synthesis_parameter_create_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_n",utc_tts_synthesis_parameter_create_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_p",utc_tts_synthesis_parameter_destroy_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_n",utc_tts_synthesis_parameter_destroy_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_p",utc_tts_synthesis_parameter_set_language_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n",utc_tts_synthesis_parameter_set_language_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n2",utc_tts_synthesis_parameter_set_language_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_p",utc_tts_synthesis_parameter_set_voice_type_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n",utc_tts_synthesis_parameter_set_voice_type_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n2",utc_tts_synthesis_parameter_set_voice_type_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_p",utc_tts_synthesis_parameter_set_personal_voice_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n",utc_tts_synthesis_parameter_set_personal_voice_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n2",utc_tts_synthesis_parameter_set_personal_voice_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_p",utc_tts_synthesis_parameter_set_speed_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n",utc_tts_synthesis_parameter_set_speed_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n2",utc_tts_synthesis_parameter_set_speed_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_p",utc_tts_synthesis_parameter_set_pitch_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n",utc_tts_synthesis_parameter_set_pitch_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n2",utc_tts_synthesis_parameter_set_pitch_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_p",utc_tts_synthesis_parameter_set_volume_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n",utc_tts_synthesis_parameter_set_volume_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n2",utc_tts_synthesis_parameter_set_volume_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_p",utc_tts_synthesis_parameter_set_background_volume_ratio_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n",utc_tts_synthesis_parameter_set_background_volume_ratio_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n2",utc_tts_synthesis_parameter_set_background_volume_ratio_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_p",utc_tts_get_pitch_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_n",utc_tts_get_pitch_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_p",utc_tts_get_volume_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_n",utc_tts_get_volume_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_p",utc_tts_add_text_with_synthesis_parameter_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n",utc_tts_add_text_with_synthesis_parameter_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n2",utc_tts_add_text_with_synthesis_parameter_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n3",utc_tts_add_text_with_synthesis_parameter_n3,utc_tts_startup,utc_tts_cleanup}, {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup}, diff --git a/src/utc/tts/tct-tts-core_tizeniot.h b/src/utc/tts/tct-tts-core_tizeniot.h index d5864d570..efdab78c3 100755 --- a/src/utc/tts/tct-tts-core_tizeniot.h +++ b/src/utc/tts/tct-tts-core_tizeniot.h @@ -193,6 +193,43 @@ extern int utc_tts_set_playing_mode_p(void); extern int utc_tts_set_playing_mode_p1(void); extern int utc_tts_set_playing_mode_n(void); extern int utc_tts_set_playing_mode_n1(void); +extern int utc_tts_add_silence_utterance_p(void); +extern int utc_tts_add_silence_utterance_n(void); +extern int utc_tts_add_silence_utterance_n2(void); +extern int utc_tts_add_silence_utterance_n3(void); +extern int utc_tts_synthesis_parameter_create_p(void); +extern int utc_tts_synthesis_parameter_create_n(void); +extern int utc_tts_synthesis_parameter_destroy_p(void); +extern int utc_tts_synthesis_parameter_destroy_n(void); +extern int utc_tts_synthesis_parameter_set_language_p(void); +extern int utc_tts_synthesis_parameter_set_language_n(void); +extern int utc_tts_synthesis_parameter_set_language_n2(void); +extern int utc_tts_synthesis_parameter_set_voice_type_p(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n2(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n2(void); +extern int utc_tts_synthesis_parameter_set_speed_p(void); +extern int utc_tts_synthesis_parameter_set_speed_n(void); +extern int utc_tts_synthesis_parameter_set_speed_n2(void); +extern int utc_tts_synthesis_parameter_set_pitch_p(void); +extern int utc_tts_synthesis_parameter_set_pitch_n(void); +extern int utc_tts_synthesis_parameter_set_pitch_n2(void); +extern int utc_tts_synthesis_parameter_set_volume_p(void); +extern int utc_tts_synthesis_parameter_set_volume_n(void); +extern int utc_tts_synthesis_parameter_set_volume_n2(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_p(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n2(void); +extern int utc_tts_get_pitch_range_p(void); +extern int utc_tts_get_pitch_range_n(void); +extern int utc_tts_get_volume_range_p(void); +extern int utc_tts_get_volume_range_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_p(void); +extern int utc_tts_add_text_with_synthesis_parameter_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_n2(void); +extern int utc_tts_add_text_with_synthesis_parameter_n3(void); extern int utc_ttse_main_p(void); extern int utc_ttse_main_n(void); extern int utc_ttse_main_n1(void); @@ -385,6 +422,43 @@ testcase tc_array[] = { {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_p",utc_tts_add_silence_utterance_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n",utc_tts_add_silence_utterance_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n2",utc_tts_add_silence_utterance_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n3",utc_tts_add_silence_utterance_n3,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_p",utc_tts_synthesis_parameter_create_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_n",utc_tts_synthesis_parameter_create_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_p",utc_tts_synthesis_parameter_destroy_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_n",utc_tts_synthesis_parameter_destroy_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_p",utc_tts_synthesis_parameter_set_language_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n",utc_tts_synthesis_parameter_set_language_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n2",utc_tts_synthesis_parameter_set_language_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_p",utc_tts_synthesis_parameter_set_voice_type_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n",utc_tts_synthesis_parameter_set_voice_type_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n2",utc_tts_synthesis_parameter_set_voice_type_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_p",utc_tts_synthesis_parameter_set_personal_voice_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n",utc_tts_synthesis_parameter_set_personal_voice_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n2",utc_tts_synthesis_parameter_set_personal_voice_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_p",utc_tts_synthesis_parameter_set_speed_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n",utc_tts_synthesis_parameter_set_speed_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n2",utc_tts_synthesis_parameter_set_speed_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_p",utc_tts_synthesis_parameter_set_pitch_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n",utc_tts_synthesis_parameter_set_pitch_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n2",utc_tts_synthesis_parameter_set_pitch_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_p",utc_tts_synthesis_parameter_set_volume_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n",utc_tts_synthesis_parameter_set_volume_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n2",utc_tts_synthesis_parameter_set_volume_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_p",utc_tts_synthesis_parameter_set_background_volume_ratio_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n",utc_tts_synthesis_parameter_set_background_volume_ratio_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n2",utc_tts_synthesis_parameter_set_background_volume_ratio_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_p",utc_tts_get_pitch_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_n",utc_tts_get_pitch_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_p",utc_tts_get_volume_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_n",utc_tts_get_volume_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_p",utc_tts_add_text_with_synthesis_parameter_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n",utc_tts_add_text_with_synthesis_parameter_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n2",utc_tts_add_text_with_synthesis_parameter_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n3",utc_tts_add_text_with_synthesis_parameter_n3,utc_tts_startup,utc_tts_cleanup}, {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup}, diff --git a/src/utc/tts/tct-tts-core_tv.h b/src/utc/tts/tct-tts-core_tv.h index d2b8ba44c..fae2b2785 100755 --- a/src/utc/tts/tct-tts-core_tv.h +++ b/src/utc/tts/tct-tts-core_tv.h @@ -193,6 +193,43 @@ extern int utc_tts_set_playing_mode_p(void); extern int utc_tts_set_playing_mode_p1(void); extern int utc_tts_set_playing_mode_n(void); extern int utc_tts_set_playing_mode_n1(void); +extern int utc_tts_add_silence_utterance_p(void); +extern int utc_tts_add_silence_utterance_n(void); +extern int utc_tts_add_silence_utterance_n2(void); +extern int utc_tts_add_silence_utterance_n3(void); +extern int utc_tts_synthesis_parameter_create_p(void); +extern int utc_tts_synthesis_parameter_create_n(void); +extern int utc_tts_synthesis_parameter_destroy_p(void); +extern int utc_tts_synthesis_parameter_destroy_n(void); +extern int utc_tts_synthesis_parameter_set_language_p(void); +extern int utc_tts_synthesis_parameter_set_language_n(void); +extern int utc_tts_synthesis_parameter_set_language_n2(void); +extern int utc_tts_synthesis_parameter_set_voice_type_p(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n2(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n2(void); +extern int utc_tts_synthesis_parameter_set_speed_p(void); +extern int utc_tts_synthesis_parameter_set_speed_n(void); +extern int utc_tts_synthesis_parameter_set_speed_n2(void); +extern int utc_tts_synthesis_parameter_set_pitch_p(void); +extern int utc_tts_synthesis_parameter_set_pitch_n(void); +extern int utc_tts_synthesis_parameter_set_pitch_n2(void); +extern int utc_tts_synthesis_parameter_set_volume_p(void); +extern int utc_tts_synthesis_parameter_set_volume_n(void); +extern int utc_tts_synthesis_parameter_set_volume_n2(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_p(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n2(void); +extern int utc_tts_get_pitch_range_p(void); +extern int utc_tts_get_pitch_range_n(void); +extern int utc_tts_get_volume_range_p(void); +extern int utc_tts_get_volume_range_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_p(void); +extern int utc_tts_add_text_with_synthesis_parameter_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_n2(void); +extern int utc_tts_add_text_with_synthesis_parameter_n3(void); testcase tc_array[] = { {"utc_tts_create_p",utc_tts_create_p,utc_tts_startup,utc_tts_cleanup}, @@ -364,6 +401,43 @@ testcase tc_array[] = { {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_p",utc_tts_add_silence_utterance_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n",utc_tts_add_silence_utterance_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n2",utc_tts_add_silence_utterance_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n3",utc_tts_add_silence_utterance_n3,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_p",utc_tts_synthesis_parameter_create_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_n",utc_tts_synthesis_parameter_create_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_p",utc_tts_synthesis_parameter_destroy_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_n",utc_tts_synthesis_parameter_destroy_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_p",utc_tts_synthesis_parameter_set_language_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n",utc_tts_synthesis_parameter_set_language_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n2",utc_tts_synthesis_parameter_set_language_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_p",utc_tts_synthesis_parameter_set_voice_type_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n",utc_tts_synthesis_parameter_set_voice_type_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n2",utc_tts_synthesis_parameter_set_voice_type_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_p",utc_tts_synthesis_parameter_set_personal_voice_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n",utc_tts_synthesis_parameter_set_personal_voice_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n2",utc_tts_synthesis_parameter_set_personal_voice_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_p",utc_tts_synthesis_parameter_set_speed_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n",utc_tts_synthesis_parameter_set_speed_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n2",utc_tts_synthesis_parameter_set_speed_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_p",utc_tts_synthesis_parameter_set_pitch_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n",utc_tts_synthesis_parameter_set_pitch_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n2",utc_tts_synthesis_parameter_set_pitch_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_p",utc_tts_synthesis_parameter_set_volume_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n",utc_tts_synthesis_parameter_set_volume_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n2",utc_tts_synthesis_parameter_set_volume_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_p",utc_tts_synthesis_parameter_set_background_volume_ratio_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n",utc_tts_synthesis_parameter_set_background_volume_ratio_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n2",utc_tts_synthesis_parameter_set_background_volume_ratio_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_p",utc_tts_get_pitch_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_n",utc_tts_get_pitch_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_p",utc_tts_get_volume_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_n",utc_tts_get_volume_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_p",utc_tts_add_text_with_synthesis_parameter_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n",utc_tts_add_text_with_synthesis_parameter_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n2",utc_tts_add_text_with_synthesis_parameter_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n3",utc_tts_add_text_with_synthesis_parameter_n3,utc_tts_startup,utc_tts_cleanup}, {NULL, NULL} }; diff --git a/src/utc/tts/tct-tts-core_wearable.h b/src/utc/tts/tct-tts-core_wearable.h index 2cc675b3e..c70538f8a 100755 --- a/src/utc/tts/tct-tts-core_wearable.h +++ b/src/utc/tts/tct-tts-core_wearable.h @@ -193,6 +193,43 @@ extern int utc_tts_set_playing_mode_p(void); extern int utc_tts_set_playing_mode_p1(void); extern int utc_tts_set_playing_mode_n(void); extern int utc_tts_set_playing_mode_n1(void); +extern int utc_tts_add_silence_utterance_p(void); +extern int utc_tts_add_silence_utterance_n(void); +extern int utc_tts_add_silence_utterance_n2(void); +extern int utc_tts_add_silence_utterance_n3(void); +extern int utc_tts_synthesis_parameter_create_p(void); +extern int utc_tts_synthesis_parameter_create_n(void); +extern int utc_tts_synthesis_parameter_destroy_p(void); +extern int utc_tts_synthesis_parameter_destroy_n(void); +extern int utc_tts_synthesis_parameter_set_language_p(void); +extern int utc_tts_synthesis_parameter_set_language_n(void); +extern int utc_tts_synthesis_parameter_set_language_n2(void); +extern int utc_tts_synthesis_parameter_set_voice_type_p(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n(void); +extern int utc_tts_synthesis_parameter_set_voice_type_n2(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n(void); +extern int utc_tts_synthesis_parameter_set_personal_voice_n2(void); +extern int utc_tts_synthesis_parameter_set_speed_p(void); +extern int utc_tts_synthesis_parameter_set_speed_n(void); +extern int utc_tts_synthesis_parameter_set_speed_n2(void); +extern int utc_tts_synthesis_parameter_set_pitch_p(void); +extern int utc_tts_synthesis_parameter_set_pitch_n(void); +extern int utc_tts_synthesis_parameter_set_pitch_n2(void); +extern int utc_tts_synthesis_parameter_set_volume_p(void); +extern int utc_tts_synthesis_parameter_set_volume_n(void); +extern int utc_tts_synthesis_parameter_set_volume_n2(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_p(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n(void); +extern int utc_tts_synthesis_parameter_set_background_volume_ratio_n2(void); +extern int utc_tts_get_pitch_range_p(void); +extern int utc_tts_get_pitch_range_n(void); +extern int utc_tts_get_volume_range_p(void); +extern int utc_tts_get_volume_range_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_p(void); +extern int utc_tts_add_text_with_synthesis_parameter_n(void); +extern int utc_tts_add_text_with_synthesis_parameter_n2(void); +extern int utc_tts_add_text_with_synthesis_parameter_n3(void); extern int utc_ttse_main_p(void); extern int utc_ttse_main_n(void); extern int utc_ttse_terminate_p(void); @@ -215,7 +252,6 @@ extern int utc_ttse_set_activated_mode_changed_cb_p(void); extern int utc_ttse_set_activated_mode_changed_cb_n(void); extern int utc_ttse_set_activated_mode_changed_cb_n2(void); - testcase tc_array[] = { {"utc_tts_create_p",utc_tts_create_p,utc_tts_startup,utc_tts_cleanup}, {"utc_tts_create_n",utc_tts_create_n,utc_tts_startup,utc_tts_cleanup}, @@ -386,6 +422,43 @@ testcase tc_array[] = { {"utc_tts_set_playing_mode_p1", utc_tts_set_playing_mode_p1, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n", utc_tts_set_playing_mode_n, utc_tts_startup, utc_tts_cleanup}, {"utc_tts_set_playing_mode_n1", utc_tts_set_playing_mode_n1, utc_tts_startup, utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_p",utc_tts_add_silence_utterance_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n",utc_tts_add_silence_utterance_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n2",utc_tts_add_silence_utterance_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_silence_utterance_n3",utc_tts_add_silence_utterance_n3,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_p",utc_tts_synthesis_parameter_create_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_create_n",utc_tts_synthesis_parameter_create_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_p",utc_tts_synthesis_parameter_destroy_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_destroy_n",utc_tts_synthesis_parameter_destroy_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_p",utc_tts_synthesis_parameter_set_language_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n",utc_tts_synthesis_parameter_set_language_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_language_n2",utc_tts_synthesis_parameter_set_language_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_p",utc_tts_synthesis_parameter_set_voice_type_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n",utc_tts_synthesis_parameter_set_voice_type_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_voice_type_n2",utc_tts_synthesis_parameter_set_voice_type_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_p",utc_tts_synthesis_parameter_set_personal_voice_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n",utc_tts_synthesis_parameter_set_personal_voice_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_personal_voice_n2",utc_tts_synthesis_parameter_set_personal_voice_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_p",utc_tts_synthesis_parameter_set_speed_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n",utc_tts_synthesis_parameter_set_speed_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_speed_n2",utc_tts_synthesis_parameter_set_speed_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_p",utc_tts_synthesis_parameter_set_pitch_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n",utc_tts_synthesis_parameter_set_pitch_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_pitch_n2",utc_tts_synthesis_parameter_set_pitch_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_p",utc_tts_synthesis_parameter_set_volume_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n",utc_tts_synthesis_parameter_set_volume_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_volume_n2",utc_tts_synthesis_parameter_set_volume_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_p",utc_tts_synthesis_parameter_set_background_volume_ratio_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n",utc_tts_synthesis_parameter_set_background_volume_ratio_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_synthesis_parameter_set_background_volume_ratio_n2",utc_tts_synthesis_parameter_set_background_volume_ratio_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_p",utc_tts_get_pitch_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_pitch_range_n",utc_tts_get_pitch_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_p",utc_tts_get_volume_range_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_get_volume_range_n",utc_tts_get_volume_range_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_p",utc_tts_add_text_with_synthesis_parameter_p,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n",utc_tts_add_text_with_synthesis_parameter_n,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n2",utc_tts_add_text_with_synthesis_parameter_n2,utc_tts_startup,utc_tts_cleanup}, + {"utc_tts_add_text_with_synthesis_parameter_n3",utc_tts_add_text_with_synthesis_parameter_n3,utc_tts_startup,utc_tts_cleanup}, {"utc_ttse_main_p",utc_ttse_main_p,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n",utc_ttse_main_n,utc_ttse_startup,utc_ttse_cleanup}, {"utc_ttse_main_n1",utc_ttse_main_n1,utc_ttse_startup,utc_ttse_cleanup}, diff --git a/src/utc/tts/utc-tts.c b/src/utc/tts/utc-tts.c index bbab8dd85..eae6e20d5 100755 --- a/src/utc/tts/utc-tts.c +++ b/src/utc/tts/utc-tts.c @@ -4608,5 +4608,936 @@ int utc_tts_set_playing_mode_n1(void) { ret = tts_unprepare(g_tts); assert_eq(ret, TTS_ERROR_NONE); } + return 0; +} + +/** + * @testcase utc_tts_add_silence_utterance_p + * @since_tizen 9.0 + * @description test whether silence for the specified amount of time is added properly. + */ +int utc_tts_add_silence_utterance_p(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_add_silent_utterance(g_tts, 1000, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_prepare(g_tts); + assert_eq(ret, TTS_ERROR_NONE); + + while(TTS_STATE_READY!=g_current_state){ + ecore_main_loop_iterate(); + } + + ret = tts_add_silent_utterance(g_tts, 1000, &utt_id); + assert_eq(ret, TTS_ERROR_NONE); + + ret = tts_unprepare(g_tts); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_add_silence_utterance_n + * @since_tizen 9.0 + * @description test whether function returns error with NULL handle. + */ +int utc_tts_add_silence_utterance_n(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_add_silent_utterance(NULL, 1000, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_silent_utterance(g_tts, 1000, NULL); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_add_silent_utterance(NULL, 1000, &utt_id); + assert_neq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_add_silence_utterance_n2 + * @since_tizen 9.0 + * @description test whether function returns error with exceed max silence duration. + */ +int utc_tts_add_silence_utterance_n2(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_add_silent_utterance(g_tts, 8000, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_silent_utterance(g_tts, 8000, &utt_id); + assert_neq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_add_silence_utterance_n3 + * @since_tizen 9.0 + * @description test whether function returns error when silence duration is negative. + */ +int utc_tts_add_silence_utterance_n3(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_add_silent_utterance(g_tts, -1000, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_silent_utterance(g_tts, -1000, &utt_id); + assert_neq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_create_p + * @since_tizen 9.0 + * @description test whether tts synthesis parameter handle is created properly + */ +int utc_tts_synthesis_parameter_create_p(void) +{ + if(g_supported == false){ + assert_eq(is_created_hndl, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + tts_synthesis_parameter_h tts_synth_h = NULL; + int ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_create_n + * @since_tizen 9.0 + * @description test whether tts synthesis parameter handle is not created with NULL parameter + */ +int utc_tts_synthesis_parameter_create_n(void) +{ + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_synthesis_parameter_create(NULL); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(NULL); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_destroy_p + * @since_tizen 9.0 + * @description test whether tts synthesis parameter handle is destroyed properly + */ +int utc_tts_synthesis_parameter_destroy_p(void) +{ + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_synthesis_parameter_destroy(g_tts); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + ret = tts_synthesis_parameter_destroy(tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_destroy_n + * @since_tizen 9.0 + * @description test whether function returns error with NULL parameter + */ +int utc_tts_synthesis_parameter_destroy_n(void) +{ + int ret = TTS_ERROR_NONE; + if(g_supported == false){ + ret = tts_synthesis_parameter_destroy(NULL); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_synthesis_parameter_destroy(NULL); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_language_p + * @since_tizen 9.0 + * @description Positive UTC for set language with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_language_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_language_n + * @since_tizen 9.0 + * @description Negative UTC for set language with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_language_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_language(NULL, "ko_KR"); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_language(NULL, "ko_KR"); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_language_n2 + * @since_tizen 9.0 + * @description Negative UTC for set language with synthesis parameter (NULL language) + */ + int utc_tts_synthesis_parameter_set_language_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_language(tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_language(tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_voice_type_p + * @since_tizen 9.0 + * @description Positive UTC for set voice type with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_voice_type_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_voice_type_n + * @since_tizen 9.0 + * @description Negative UTC for set voice type with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_voice_type_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_voice_type(NULL, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_voice_type(NULL, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_voice_type_n2 + * @since_tizen 9.0 + * @description Negative UTC for set voice type with synthesis parameter (Invalid type) + */ + int utc_tts_synthesis_parameter_set_voice_type_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, -1); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, -1); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_personal_voice_p + * @since_tizen 9.0 + * @description Positive UTC for set personal voice with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_personal_voice_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_personal_voice(tts_synth_h, "ptts_test"); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_personal_voice(tts_synth_h, "ptts_test"); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_personal_voice_n + * @since_tizen 9.0 + * @description Negative UTC for set personal voice with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_personal_voice_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_personal_voice(NULL, "ptts_test"); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_personal_voice(NULL, "ptts_test"); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_personal_voice_n2 + * @since_tizen 9.0 + * @description Negative UTC for set personal voice with synthesis parameter (Invalid personal voice) + */ + int utc_tts_synthesis_parameter_set_personal_voice_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_personal_voice(tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_personal_voice(tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_speed_p + * @since_tizen 9.0 + * @description Positive UTC for set speed with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_speed_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_speed_n + * @since_tizen 9.0 + * @description Negative UTC for set speed with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_speed_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_speed(NULL, 5); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_speed(NULL, 5); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_speed_n2 + * @since_tizen 9.0 + * @description Negative UTC for set speed with synthesis parameter (Invalid speed) + */ + int utc_tts_synthesis_parameter_set_speed_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 100); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 100); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_pitch_p + * @since_tizen 9.0 + * @description Positive UTC for set pitch with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_pitch_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_pitch_n + * @since_tizen 9.0 + * @description Negative UTC for set pitch with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_pitch_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_pitch(NULL, 10); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_pitch(NULL, 10); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_pitch_n2 + * @since_tizen 9.0 + * @description Negative UTC for set pitch with synthesis parameter (Invalid pitch) + */ + int utc_tts_synthesis_parameter_set_pitch_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 100); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 100); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_volume_p + * @since_tizen 9.0 + * @description Positive UTC for set volume with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_volume_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_volume_n + * @since_tizen 9.0 + * @description Negative UTC for set volume with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_volume_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_volume(NULL, 90.0); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_volume(NULL, 90.0); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_volume_n2 + * @since_tizen 9.0 + * @description Negative UTC for set volume with synthesis parameter (Invalid volume) + */ + int utc_tts_synthesis_parameter_set_volume_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 200.0); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 200.0); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_background_volume_ratio_p + * @since_tizen 9.0 + * @description Positive UTC for set background volume ratio with synthesis parameter + */ +int utc_tts_synthesis_parameter_set_background_volume_ratio_p(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NONE); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_background_volume_ratio_n + * @since_tizen 9.0 + * @description Negative UTC for set background volume ratio with synthesis parameter (Invalid handle) + */ + int utc_tts_synthesis_parameter_set_background_volume_ratio_n(void) { + int ret = TTS_ERROR_NONE; + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_background_volume_ratio(NULL, 0.6); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_background_volume_ratio(NULL, 0.6); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_synthesis_parameter_set_background_volume_ratio_n2 + * @since_tizen 9.0 + * @description Negative UTC for set background volume ratio with synthesis parameter (Invalid background volume) + */ + int utc_tts_synthesis_parameter_set_background_volume_ratio_n2(void) { + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + + if (g_supported == false) { + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 60.0); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + } + else { + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 60.0); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + } + return 0; +} + +/** + * @testcase utc_tts_get_pitch_range_p + * @since_tizen 9.0 + * @description test whether pitch range is gotten properly. + */ +int utc_tts_get_pitch_range_p(void) +{ + int min; + int normal; + int max; + int ret = TTS_ERROR_NONE; + + if(g_supported == false){ + ret = tts_get_pitch_range(g_tts, &min, &normal, &max); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_get_pitch_range(g_tts, &min, &normal, &max); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_get_pitch_range_n + * @since_tizen 9.0 + * @description test whether function returns error with NULL parameter. + */ +int utc_tts_get_pitch_range_n(void) +{ + int min; + int normal; + int max; + int ret = TTS_ERROR_NONE; + + if(g_supported == false){ + ret = tts_get_pitch_range(NULL, &min, &normal, &max); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_get_pitch_range(g_tts, NULL, NULL, NULL); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_get_pitch_range(NULL, &min, &normal, &max); + assert_neq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_get_volume_range_p + * @since_tizen 9.0 + * @description test whether volume range is gotten properly. + */ +int utc_tts_get_volume_range_p(void) +{ + int min; + int max; + int ret = TTS_ERROR_NONE; + + if(g_supported == false){ + ret = tts_get_volume_range(g_tts, &min, &max); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + + assert_eq(is_created_hndl, TTS_ERROR_NONE); + ret = tts_get_volume_range(g_tts, &min, &max); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_get_volume_range_n + * @since_tizen 9.0 + * @description test whether function returns error with NULL parameter. + */ +int utc_tts_get_volume_range_n(void) +{ + int min; + int normal; + int max; + int ret = TTS_ERROR_NONE; + + if(g_supported == false){ + ret = tts_get_volume_range(NULL, &min, &max); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_get_volume_range(g_tts, NULL, NULL); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_get_volume_range(NULL, &min, &max); + assert_neq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_add_text_with_synthesis_parameter_p + * @since_tizen 9.0 + * @description test whether text is added to the queue with synthesis parameter properly. + */ +int utc_tts_add_text_with_synthesis_parameter_p(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NONE); + + if(g_supported == false){ + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", tts_synth_h, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_prepare(g_tts); + assert_eq(ret, TTS_ERROR_NONE); + + while(TTS_STATE_READY!=g_current_state){ + ecore_main_loop_iterate(); + } + + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", tts_synth_h, &utt_id); + assert_eq(ret, TTS_ERROR_NONE); + + ret = tts_unprepare(g_tts); + assert_eq(ret, TTS_ERROR_NONE); + + return 0; +} + +/** + * @testcase utc_tts_add_text_with_synthesis_parameter_n + * @since_tizen 9.0 + * @description test whether function returns error with Invalid handle (NULL). + */ +int utc_tts_add_text_with_synthesis_parameter_n(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NONE); + + if(g_supported == false){ + ret = tts_add_text_with_synthesis_parameter(NULL, "This is Test", tts_synth_h, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(NULL, "This is Test", tts_synth_h, &utt_id); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(NULL, "This is Test", tts_synth_h, &utt_id); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + + return 0; +} + +/** + * @testcase utc_tts_add_text_with_synthesis_parameter_n2 + * @since_tizen 9.0 + * @description test whether function returns error with Invalid synthesis parameter handle + */ +int utc_tts_add_text_with_synthesis_parameter_n2(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NONE); + + if(g_supported == false){ + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", NULL, &utt_id); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", NULL, &utt_id); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", NULL, &utt_id); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + + return 0; +} + +/** + * @testcase utc_tts_add_text_with_synthesis_parameter_n3 + * @since_tizen 9.0 + * @description test whether function returns error with Invalid parameter (utt_id) + */ +int utc_tts_add_text_with_synthesis_parameter_n3(void) +{ + int utt_id; + int ret = TTS_ERROR_NONE; + + tts_synthesis_parameter_h tts_synth_h = NULL; + ret = tts_synthesis_parameter_create(&tts_synth_h); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_language(tts_synth_h, "ko_KR"); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_speed(tts_synth_h, 5); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_pitch(tts_synth_h, 10); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_voice_type(tts_synth_h, TTS_VOICE_TYPE_FEMALE); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_volume(tts_synth_h, 90.0); + assert_eq(ret, TTS_ERROR_NONE); + ret = tts_synthesis_parameter_set_background_volume_ratio(tts_synth_h, 0.6); + assert_eq(ret, TTS_ERROR_NONE); + + if(g_supported == false){ + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_NOT_SUPPORTED); + return 0; + } + assert_eq(is_created_hndl, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", tts_synth_h, NULL); + assert_neq(ret, TTS_ERROR_NONE); + + ret = tts_add_text_with_synthesis_parameter(g_tts, "This is Test", tts_synth_h, NULL); + assert_eq(ret, TTS_ERROR_INVALID_PARAMETER); + return 0; } \ No newline at end of file