[ITC][tts][ACR-1839, ACR-1840] TCs added for new APIs 01/318401/2
authorshobhitv <shobhit.v@samsung.com>
Fri, 27 Sep 2024 10:35:28 +0000 (16:05 +0530)
committershobhitv <shobhit.v@samsung.com>
Fri, 27 Sep 2024 12:00:19 +0000 (17:30 +0530)
Change-Id: Icb86be8363a7b6b2ee18e0b4f70c32e8a6d8ea8e
Signed-off-by: shobhitv <shobhit.v@samsung.com>
src/itc/tts/ITs-tts.c
src/itc/tts/tct-tts-native_mobile.h
src/itc/tts/tct-tts-native_tizeniot.h
src/itc/tts/tct-tts-native_tv.h
src/itc/tts/tct-tts-native_wearable.h

index 0797ba48228238be3d4d694e065199b19d332d5e..c9ba2084ff9f4817682ed62307baaf6297735d3a 100644 (file)
@@ -15,7 +15,7 @@
 //
 #include "ITs-tts-common.h"
 #include <Ecore.h>
-
+#include <dlog.h>
 /** @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;
+}
 /** @} */
 /** @} */
index 87860e1dc471da92e953f9efe13cc8d2b0c255d8..cb473436c74c125e7bab426c5c19f1a41f7958f8 100644 (file)
@@ -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}
 };
 
index 57a9d99b8c031f8a21ac322e1653bf10ba525391..c46caacfc25045938ea7aeee758287b01dae03da 100644 (file)
@@ -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}
 };
 
index 5e67fc549d91609b01104b36fe6fc5ec9f60f2e8..2d8858481cac8594e01171b6605209badc2c13be 100644 (file)
@@ -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}
 };
 
index 87860e1dc471da92e953f9efe13cc8d2b0c255d8..cb473436c74c125e7bab426c5c19f1a41f7958f8 100644 (file)
@@ -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}
 };