From: shobhitv Date: Fri, 27 Sep 2024 10:35:28 +0000 (+0530) Subject: [ITC][tts][ACR-1839, ACR-1840] TCs added for new APIs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=593c219415c1ff9a808f4be84cbb37bae33747ba;p=test%2Ftct%2Fnative%2Fapi.git [ITC][tts][ACR-1839, ACR-1840] TCs added for new APIs Change-Id: Icb86be8363a7b6b2ee18e0b4f70c32e8a6d8ea8e Signed-off-by: shobhitv --- diff --git a/src/itc/tts/ITs-tts.c b/src/itc/tts/ITs-tts.c index 0797ba482..c9ba2084f 100644 --- a/src/itc/tts/ITs-tts.c +++ b/src/itc/tts/ITs-tts.c @@ -15,7 +15,7 @@ // #include "ITs-tts-common.h" #include - +#include /** @addtogroup itc-tts * @ingroup itc * @{ @@ -1846,5 +1846,459 @@ int ITc_tts_set_playing_mode_p(void) return 0; } + +//& type: auto +//& purpose: To add silence for the specified amount of time +/** +* @testcase ITc_tts_add_silence_utterance_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario To Adds silence for the specified amount of time +* @apicovered tts_add_silent_utterance +* @passcase if tts_add_silent_utterance is successful +* @failcase if tts_add_silent_utterance is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_add_silence_utterance_p(void) +{ + START_TEST; + int nUttId = -1; + int nRet = TTS_ERROR_NONE; + + if (g_bFeatureSupported == false) + { + nRet = tts_add_silent_utterance(g_pstTts, 1000, &nUttId); + PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_add_silent_utterance", TtsGetError(nRet)); + return 0; + } + + if ( TtsSetStateChangedCallBacks(TtsStateChangedCallback) == 1 ) + { + return 1; + } + + nRet = tts_prepare(g_pstTts); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_prepare", TtsGetError(nRet), TtsUnSetStateChangedCallBacks()); + + while(TTS_STATE_READY != g_eCurrent_state){ + ecore_main_loop_iterate(); + } + + nRet = tts_add_silent_utterance(g_pstTts, 1000, &nUttId); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_add_silent_utterance", TtsGetError(nRet), tts_unprepare(g_pstTts);TtsUnSetStateChangedCallBacks()); + if (nUttId == -1) + { + FPRINTF("[Line: %d][%s] tts_add_silent_utterance failed, Invalid ID returned callback invoked\\n", __LINE__, API_NAMESPACE); + tts_unprepare(g_pstTts); + TtsUnSetStateChangedCallBacks(); + return 1; + } + nRet = tts_unprepare(g_pstTts); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_unprepare", TtsGetError(nRet)); + + TtsUnSetStateChangedCallBacks(); + return 0; +} + + +//& purpose: Create and destroy a handle for TTS synthesis parameters. +/** +* @testcase ITc_tts_synthesis_parameter_create_destroy_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Create a handle for TTS synthesis parameters and destroy it +* @apicovered tts_synthesis_parameter_create and tts_synthesis_parameter_destroy +* @passcase if tts_synthesis_parameter_create and tts_synthesis_parameter_destroy is successful +* @failcase if tts_synthesis_parameter_create Or tts_synthesis_parameter_destroy is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_create_destroy_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + int nRet = TTS_ERROR_NONE; + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + return 0; + } + + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth,"tts_synthesis_parameter_create"); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Set language with synthesis parameter +/** +* @testcase ITc_tts_synthesis_parameter_set_language_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Set language with synthesis parameter +* @apicovered tts_synthesis_parameter_set_language +* @passcase if tts_synthesis_parameter_set_language is successful +* @failcase if tts_synthesis_parameter_set_language is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_set_language_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + + int nRet = TTS_ERROR_NONE; + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_set_language(h_TtsSynth, "ko_KR"); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_language", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + nRet = tts_synthesis_parameter_set_language(h_TtsSynth, "ko_KR"); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_language", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Set synthesis parameter voice type +/** +* @testcase ITc_tts_synthesis_parameter_set_voice_type_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Sets voice type +* @apicovered tts_synthesis_parameter_set_voice_type +* @passcase if tts_synthesis_parameter_set_voice_type is successful +* @failcase if tts_synthesis_parameter_set_voice_type is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_set_voice_type_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + + int nRet = TTS_ERROR_NONE; + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_set_voice_type(h_TtsSynth, TTS_VOICE_TYPE_MALE); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_voice_type", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + for (int nIndex = 0; nIndex <5; nIndex++) + { + /* TTS_VOICE_TYPE_AUTO 0 + TTS_VOICE_TYPE_MALE 1 + TTS_VOICE_TYPE_FEMALE 2 + TTS_VOICE_TYPE_CHILD 3 + TTS_VOICE_TYPE_PERSONAL 4 */ + nRet = tts_synthesis_parameter_set_voice_type(h_TtsSynth, nIndex); + FPRINTF("[Line: %d][%s] Voice type: %d\\n", __LINE__, API_NAMESPACE, nIndex); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_voice_type", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + } + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Sets the ID for personal voice data +/** +* @testcase ITc_tts_synthesis_parameter_set_personal_voice_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Sets the ID for personal voice data +* @apicovered tts_synthesis_parameter_set_personal_voice +* @passcase if tts_synthesis_parameter_set_personal_voice is successful +* @failcase if tts_synthesis_parameter_set_personal_voice is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_set_personal_voice_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + + int nRet = TTS_ERROR_NONE; + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_set_personal_voice(h_TtsSynth, "test_personal"); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_personal_voice", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + nRet = tts_synthesis_parameter_set_personal_voice(h_TtsSynth, "test_personal"); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_personal_voice", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Sets the speed and pitch +/** +* @testcase ITc_tts_synthesis_parameter_set_speed_set_pitch_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Sets the speed and pitch +* @apicovered tts_synthesis_parameter_set_speed and tts_synthesis_parameter_set_pitch +* @passcase if tts_synthesis_parameter_set_speed and tts_synthesis_parameter_set_pitch is successful +* @failcase if tts_synthesis_parameter_set_speed Or tts_synthesis_parameter_set_pitch is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_set_speed_set_pitch_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + + int nRet = TTS_ERROR_NONE; + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_set_speed(h_TtsSynth, 4); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_speed", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_pitch(h_TtsSynth, 10); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_pitch", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + nRet = tts_synthesis_parameter_set_speed(h_TtsSynth, 4); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_speed", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_pitch(h_TtsSynth, 10); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_pitch", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Sets volume and background volume ratio +/** +* @testcase ITc_tts_synthesis_parameter_set_volume_background_ratio_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Sets volume and background volume ratio +* @apicovered tts_synthesis_parameter_set_volume and tts_synthesis_parameter_set_background_volume_ratio +* @passcase if tts_synthesis_parameter_set_volume and tts_synthesis_parameter_set_background_volume_ratio is successful +* @failcase if tts_synthesis_parameter_set_volume and tts_synthesis_parameter_set_background_volume_ratio is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_synthesis_parameter_set_volume_background_ratio_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + + int nRet = TTS_ERROR_NONE; + nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + if (g_bFeatureSupported == false) + { + nRet = tts_synthesis_parameter_set_volume(h_TtsSynth, 95.0); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_volume", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_background_volume_ratio(h_TtsSynth, 0.5); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_synthesis_parameter_set_background_volume_ratio", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + nRet = tts_synthesis_parameter_set_volume(h_TtsSynth, 95.0); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_volume", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_background_volume_ratio(h_TtsSynth, 0.5); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_background_volume_ratio", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} + +//& purpose: Get pitch range and volume range +/** +* @testcase ITc_tts_get_pitch_volume_range_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Get pitch range and volume range +* @apicovered tts_get_pitch_range and tts_get_volume_range +* @passcase if tts_get_pitch_range and tts_get_volume_range is successful +* @failcase if tts_get_pitch_range and tts_get_volume_range is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_get_pitch_volume_range_p(void) +{ + START_TEST; + int nMin = -1; + int nNormal = -1; + int nMax = -1; + int nRet = TTS_ERROR_NONE; + + if (g_bFeatureSupported == false) + { + nRet = tts_get_pitch_range(g_pstTts, &nMin, &nNormal, &nMax); + PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_get_pitch_range", TtsGetError(nRet)); + + nRet = tts_get_volume_range(g_pstTts, &nMin, &nMax); + PRINT_RESULT(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_get_volume_range", TtsGetError(nRet)); + return 0; + } + + nRet = tts_get_pitch_range(g_pstTts, &nMin, &nNormal, &nMax); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_get_pitch_range", TtsGetError(nRet)); + if (nMin == -1 || nMax == -1 || nNormal == -1) + { + FPRINTF("[Line: %d][%s] tts_get_pitch_range failed. Invalid pitch range is received. Min= %d, Max= %d, Normal= %d\\n", __LINE__, API_NAMESPACE, nMin, nMax, nNormal); + return 1; + } + + nMin = -1; + nMax = -1; + + nRet = tts_get_volume_range(g_pstTts, &nMin, &nMax); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_get_volume_range", TtsGetError(nRet)); + if (nMin == -1 || nMax == -1) + { + FPRINTF("[Line: %d][%s] tts_get_volume_range failed. Invalid volume range is received. Min= %d, Max= %d \\n", __LINE__, API_NAMESPACE, nMin, nMax); + return 1; + } + + return 0; +} + +//& purpose: Adds a text to the queue with synthesis parameter +/** +* @testcase ITc_tts_add_text_with_synthesis_parameter_p +* @since_tizen 9.0 +* @author SRID(shobhit.v) +* @reviewer SRID(utk.tiwari) +* @type auto +* @scenario Adds a text to the queue with synthesis parameter +* @apicovered tts_add_text_with_synthesis_parameter +* @passcase if tts_add_text_with_synthesis_parameter is successful +* @failcase if tts_add_text_with_synthesis_parameter is not successful +* @precondition NA +* @postcondition NA +*/ +int ITc_tts_add_text_with_synthesis_parameter_p(void) +{ + START_TEST; + tts_synthesis_parameter_h h_TtsSynth = NULL; + int nUttId = -1; + + int nRet = tts_synthesis_parameter_create(&h_TtsSynth); + PRINT_RESULT(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_create", TtsGetError(nRet)); + CHECK_HANDLE(h_TtsSynth, "tts_synthesis_parameter_create"); + + nRet = tts_synthesis_parameter_set_language(h_TtsSynth, "ko_KR"); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_language", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_speed(h_TtsSynth, 5); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_speed", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_pitch(h_TtsSynth, 10); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_pitch", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_voice_type(h_TtsSynth, TTS_VOICE_TYPE_FEMALE); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_voice_type", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_volume(h_TtsSynth, 90.0); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_volume", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + nRet = tts_synthesis_parameter_set_background_volume_ratio(h_TtsSynth, 0.6); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_set_background_volume_ratio", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + if (g_bFeatureSupported == false) + { + nRet = tts_add_text_with_synthesis_parameter(g_pstTts, "Positive Test", h_TtsSynth, &nUttId); + PRINT_RESULT_CLEANUP(TTS_ERROR_NOT_SUPPORTED, nRet, "tts_add_text_with_synthesis_parameter", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + return 0; + } + + if ( TtsSetStateChangedCallBacks(TtsStateChangedCallback) == 1 ) + { + return 1; + } + + nRet = tts_prepare(g_pstTts); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_prepare", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth);TtsUnSetStateChangedCallBacks()); + + while(TTS_STATE_READY != g_eCurrent_state){ + ecore_main_loop_iterate(); + } + + nRet = tts_add_text_with_synthesis_parameter(g_pstTts, "Positive Test", h_TtsSynth, &nUttId); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_add_text_with_synthesis_parameter", TtsGetError(nRet), tts_unprepare(g_pstTts);TtsUnSetStateChangedCallBacks();tts_synthesis_parameter_destroy(h_TtsSynth)); + if (nUttId == -1) + { + FPRINTF("[Line: %d][%s] tts_add_text_with_synthesis_parameter failed. Invalid ID returned\\n", __LINE__, API_NAMESPACE); + tts_unprepare(g_pstTts); + tts_synthesis_parameter_destroy(h_TtsSynth); + return 1; + } + + nRet = tts_unprepare(g_pstTts); + PRINT_RESULT_CLEANUP(TTS_ERROR_NONE, nRet, "tts_unprepare", TtsGetError(nRet), tts_synthesis_parameter_destroy(h_TtsSynth)); + + TtsUnSetStateChangedCallBacks(); + + nRet = tts_synthesis_parameter_destroy(h_TtsSynth); + PRINT_RESULT_NORETURN(TTS_ERROR_NONE, nRet, "tts_synthesis_parameter_destroy", TtsGetError(nRet)); + + return 0; +} /** @} */ /** @} */ diff --git a/src/itc/tts/tct-tts-native_mobile.h b/src/itc/tts/tct-tts-native_mobile.h index 87860e1dc..cb473436c 100644 --- a/src/itc/tts/tct-tts-native_mobile.h +++ b/src/itc/tts/tct-tts-native_mobile.h @@ -57,6 +57,15 @@ extern int ITc_tts_get_service_state_p(void); extern int ITc_tts_set_unset_service_state_changed_cb_p(void); extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void); extern int ITc_tts_set_playing_mode_p(void); +extern int ITc_tts_add_silence_utterance_p(void); +extern int ITc_tts_synthesis_parameter_create_destroy_p(void); +extern int ITc_tts_synthesis_parameter_set_language_p(void); +extern int ITc_tts_synthesis_parameter_set_voice_type_p(void); +extern int ITc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int ITc_tts_synthesis_parameter_set_speed_set_pitch_p(void); +extern int ITc_tts_synthesis_parameter_set_volume_background_ratio_p(void); +extern int ITc_tts_get_pitch_volume_range_p(void); +extern int ITc_tts_add_text_with_synthesis_parameter_p(void); testcase tc_array[] = { {"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, @@ -92,6 +101,15 @@ testcase tc_array[] = { {"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_create_destroy_p",ITc_tts_synthesis_parameter_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_language_p",ITc_tts_synthesis_parameter_set_language_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_voice_type_p",ITc_tts_synthesis_parameter_set_voice_type_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_personal_voice_p",ITc_tts_synthesis_parameter_set_personal_voice_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_speed_set_pitch_p",ITc_tts_synthesis_parameter_set_speed_set_pitch_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_volume_background_ratio_p",ITc_tts_synthesis_parameter_set_volume_background_ratio_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_silence_utterance_p",ITc_tts_add_silence_utterance_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_text_with_synthesis_parameter_p",ITc_tts_add_text_with_synthesis_parameter_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_get_pitch_volume_range_p",ITc_tts_get_pitch_volume_range_p,ITs_tts_startup,ITs_tts_cleanup}, {NULL, NULL} }; diff --git a/src/itc/tts/tct-tts-native_tizeniot.h b/src/itc/tts/tct-tts-native_tizeniot.h index 57a9d99b8..c46caacfc 100644 --- a/src/itc/tts/tct-tts-native_tizeniot.h +++ b/src/itc/tts/tct-tts-native_tizeniot.h @@ -56,6 +56,15 @@ extern int ITc_tts_get_service_state_p(void); extern int ITc_tts_set_unset_service_state_changed_cb_p(void); extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void); extern int ITc_tts_set_playing_mode_p(void); +extern int ITc_tts_add_silence_utterance_p(void); +extern int ITc_tts_synthesis_parameter_create_destroy_p(void); +extern int ITc_tts_synthesis_parameter_set_language_p(void); +extern int ITc_tts_synthesis_parameter_set_voice_type_p(void); +extern int ITc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int ITc_tts_synthesis_parameter_set_speed_set_pitch_p(void); +extern int ITc_tts_synthesis_parameter_set_volume_background_ratio_p(void); +extern int ITc_tts_get_pitch_volume_range_p(void); +extern int ITc_tts_add_text_with_synthesis_parameter_p(void); testcase tc_array[] = { {"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, @@ -90,6 +99,15 @@ testcase tc_array[] = { {"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_create_destroy_p",ITc_tts_synthesis_parameter_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_language_p",ITc_tts_synthesis_parameter_set_language_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_voice_type_p",ITc_tts_synthesis_parameter_set_voice_type_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_personal_voice_p",ITc_tts_synthesis_parameter_set_personal_voice_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_speed_set_pitch_p",ITc_tts_synthesis_parameter_set_speed_set_pitch_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_volume_background_ratio_p",ITc_tts_synthesis_parameter_set_volume_background_ratio_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_silence_utterance_p",ITc_tts_add_silence_utterance_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_text_with_synthesis_parameter_p",ITc_tts_add_text_with_synthesis_parameter_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_get_pitch_volume_range_p",ITc_tts_get_pitch_volume_range_p,ITs_tts_startup,ITs_tts_cleanup}, {NULL, NULL} }; diff --git a/src/itc/tts/tct-tts-native_tv.h b/src/itc/tts/tct-tts-native_tv.h index 5e67fc549..2d8858481 100644 --- a/src/itc/tts/tct-tts-native_tv.h +++ b/src/itc/tts/tct-tts-native_tv.h @@ -49,6 +49,15 @@ extern int ITc_tts_get_service_state_p(void); extern int ITc_tts_set_unset_service_state_changed_cb_p(void); extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void); extern int ITc_tts_set_playing_mode_p(void); +extern int ITc_tts_add_silence_utterance_p(void); +extern int ITc_tts_synthesis_parameter_create_destroy_p(void); +extern int ITc_tts_synthesis_parameter_set_language_p(void); +extern int ITc_tts_synthesis_parameter_set_voice_type_p(void); +extern int ITc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int ITc_tts_synthesis_parameter_set_speed_set_pitch_p(void); +extern int ITc_tts_synthesis_parameter_set_volume_background_ratio_p(void); +extern int ITc_tts_get_pitch_volume_range_p(void); +extern int ITc_tts_add_text_with_synthesis_parameter_p(void); testcase tc_array[] = { {"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, @@ -76,6 +85,15 @@ testcase tc_array[] = { {"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_create_destroy_p",ITc_tts_synthesis_parameter_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_language_p",ITc_tts_synthesis_parameter_set_language_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_voice_type_p",ITc_tts_synthesis_parameter_set_voice_type_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_personal_voice_p",ITc_tts_synthesis_parameter_set_personal_voice_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_speed_set_pitch_p",ITc_tts_synthesis_parameter_set_speed_set_pitch_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_volume_background_ratio_p",ITc_tts_synthesis_parameter_set_volume_background_ratio_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_silence_utterance_p",ITc_tts_add_silence_utterance_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_text_with_synthesis_parameter_p",ITc_tts_add_text_with_synthesis_parameter_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_get_pitch_volume_range_p",ITc_tts_get_pitch_volume_range_p,ITs_tts_startup,ITs_tts_cleanup}, {NULL, NULL} }; diff --git a/src/itc/tts/tct-tts-native_wearable.h b/src/itc/tts/tct-tts-native_wearable.h index 87860e1dc..cb473436c 100644 --- a/src/itc/tts/tct-tts-native_wearable.h +++ b/src/itc/tts/tct-tts-native_wearable.h @@ -57,6 +57,15 @@ extern int ITc_tts_get_service_state_p(void); extern int ITc_tts_set_unset_service_state_changed_cb_p(void); extern int ITc_tts_set_unset_synthesized_pcm_cb_p(void); extern int ITc_tts_set_playing_mode_p(void); +extern int ITc_tts_add_silence_utterance_p(void); +extern int ITc_tts_synthesis_parameter_create_destroy_p(void); +extern int ITc_tts_synthesis_parameter_set_language_p(void); +extern int ITc_tts_synthesis_parameter_set_voice_type_p(void); +extern int ITc_tts_synthesis_parameter_set_personal_voice_p(void); +extern int ITc_tts_synthesis_parameter_set_speed_set_pitch_p(void); +extern int ITc_tts_synthesis_parameter_set_volume_background_ratio_p(void); +extern int ITc_tts_get_pitch_volume_range_p(void); +extern int ITc_tts_add_text_with_synthesis_parameter_p(void); testcase tc_array[] = { {"ITc_tts_create_destroy_p",ITc_tts_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, @@ -92,6 +101,15 @@ testcase tc_array[] = { {"ITc_tts_set_unset_service_state_changed_cb_p",ITc_tts_set_unset_service_state_changed_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_unset_synthesized_pcm_cb_p",ITc_tts_set_unset_synthesized_pcm_cb_p,ITs_tts_startup,ITs_tts_cleanup}, {"ITc_tts_set_playing_mode_p",ITc_tts_set_playing_mode_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_create_destroy_p",ITc_tts_synthesis_parameter_create_destroy_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_language_p",ITc_tts_synthesis_parameter_set_language_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_voice_type_p",ITc_tts_synthesis_parameter_set_voice_type_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_personal_voice_p",ITc_tts_synthesis_parameter_set_personal_voice_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_speed_set_pitch_p",ITc_tts_synthesis_parameter_set_speed_set_pitch_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_synthesis_parameter_set_volume_background_ratio_p",ITc_tts_synthesis_parameter_set_volume_background_ratio_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_silence_utterance_p",ITc_tts_add_silence_utterance_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_add_text_with_synthesis_parameter_p",ITc_tts_add_text_with_synthesis_parameter_p,ITs_tts_startup,ITs_tts_cleanup}, + {"ITc_tts_get_pitch_volume_range_p",ITc_tts_get_pitch_volume_range_p,ITs_tts_startup,ITs_tts_cleanup}, {NULL, NULL} };