Revert "Add checking personal voice and create speak data with personal voice id" 52/316952/1
authordyamy-lee <dyamy.lee@samsung.com>
Mon, 2 Sep 2024 01:52:50 +0000 (10:52 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Mon, 2 Sep 2024 01:55:13 +0000 (10:55 +0900)
This reverts commit 1a99787008f1349c1602a0e6cf27af1d532812b9.

Change-Id: I11b96656d72ca036abc9d2ce486b21b82c5b7149

common/tts_config_mgr.c
include/ttse.h
server/ttsd_config.c
server/ttsd_config.h
server/ttsd_data.cpp
server/ttsd_data.h
server/ttsd_engine_agent.c
server/ttsd_engine_agent.h
server/ttsd_server.c

index 4b6831d..7650786 100644 (file)
@@ -2457,8 +2457,12 @@ int tts_config_mgr_update_personal_voice(const char* engine_id, const char* lang
        }
 
        SLOG(LOG_DEBUG, TAG_TTSCONFIG, "[DEBUG] Finish update personal info");
-
-       __tts_config_mgr_print_personal_info(engine_id);
+       tts_personal_info_s* info = NULL;
+       int ret = tts_parser_get_personal_info(filepath, &info);
+       if (0 != ret) {
+               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to get personal info");
+               return -1;
+       }
 
        return 0;
 }
index 6577f3e..ca92981 100755 (executable)
@@ -103,8 +103,6 @@ typedef enum {
 */
 #define TTSE_VOICE_TYPE_CHILD  3
 
-#define TTSE_VOICE_TYPE_PERSONAL       4
-
 /**
 * @brief Called when TTS engine informs the engine service user about whole supported language and voice type list.
 * @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function.
index 67352bb..3530106 100644 (file)
@@ -24,8 +24,6 @@ static ttsd_config_changed_cb g_callback;
 
 static ttsd_config_screen_reader_changed_cb g_sr_callback;
 
-static ttsd_config_supported_personal_voice_cb g_personal_voice_cb;
-
 void __ttsd_config_engine_changed_cb(const char* engine_id, const char* setting, const char* language, int voice_type, bool auto_voice, bool need_credential, void* user_data)
 {
        /* Need to check engine is valid */
@@ -279,39 +277,3 @@ int ttsd_config_update_personal_voice(const char* language, const char* unique_i
 
        return 0;
 }
-
-bool __ttsd_config_personal_voices(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data)
-{
-       if (NULL == g_personal_voice_cb) {
-               SLOG(LOG_ERROR, tts_tag(), "[Config ERROR] Fail to get g_personal_voice_callback");
-               return false;
-       }
-
-       g_personal_voice_cb(language, unique_id, user_data);
-       return true;
-}
-
-int ttsd_config_get_personal_voices_list(ttsd_config_supported_personal_voice_cb personal_voice_cb, void* user_data)
-{
-       if (NULL == personal_voice_cb) {
-               SLOG(LOG_ERROR, tts_tag(), "[Config ERROR] No personal voice callback parameter");
-               return -1;
-       }
-
-       g_personal_voice_cb = personal_voice_cb;
-
-       char* current_engine = NULL;
-       int ret = tts_config_mgr_get_engine(&current_engine);
-       if (0 != ret || NULL == current_engine) {
-               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to get current engine : %d", ret);
-               return ret;
-       }
-
-       ret = tts_config_mgr_get_personal_voice_list(current_engine, __ttsd_config_personal_voices, user_data);
-       if (TTS_CONFIG_ERROR_NONE != ret) {
-               SLOG(LOG_ERROR, TAG_TTSCONFIG, "[Config ERROR] Fail to get persoanl voice list. ret(%d)", ret);
-               return TTSD_ERROR_OPERATION_FAILED;
-       }
-
-       return TTSD_ERROR_NONE;
-}
index e1f1a7c..70097e0 100644 (file)
@@ -33,8 +33,6 @@ typedef void (*ttsd_config_changed_cb)(tts_config_type_e type, const char* str_p
 
 typedef void (*ttsd_config_screen_reader_changed_cb)(bool value);
 
-typedef bool (*ttsd_config_supported_personal_voice_cb)(const char* language, const char* unique_id, void* user_data);
-
 int ttsd_config_initialize(ttsd_config_changed_cb config_cb);
 
 int ttsd_config_finalize();
@@ -62,8 +60,6 @@ int ttsd_config_set_instant_reprepare_client(const unsigned int uid);
 
 int ttsd_config_update_personal_voice(const char* language, const char* unique_id, const char* display_name, const char* device_name, void* user_data);
 
-int ttsd_config_get_personal_voices_list(ttsd_config_supported_personal_voice_cb personal_voice_cb, void* user_data);
-
 #ifdef __cplusplus
 }
 #endif
index 8c25dc2..2a8dfb6 100644 (file)
@@ -196,8 +196,8 @@ int ttsd_data_new_client(int pid, unsigned int uid, ttsd_mode_e mode, ttsd_playi
 
 static inline void destroy_speak_data(speak_data_s* speak_data)
 {
-       SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] utt(%d), text(%s), lang(%s), vctype(%d) speed(%d) ptts_id(%s)",
-               speak_data->utt_id, speak_data->text == nullptr ? "NULL" : speak_data->text, speak_data->voice.language == nullptr ? "NULL" : speak_data->voice.language, speak_data->voice.type, speak_data->synth_parameter.speed, speak_data->voice.ptts_id == nullptr ? "NULL" : speak_data->voice.ptts_id);
+       SLOG(LOG_DEBUG, tts_tag(), "[DEBUG] utt(%d), text(%s), lang(%s), vctype(%d) speed(%d)",
+               speak_data->utt_id, speak_data->text == nullptr ? "NULL" : speak_data->text, speak_data->voice.language == nullptr ? "NULL" : speak_data->voice.language, speak_data->voice.type, speak_data->synth_parameter.speed);
 
        free(speak_data->text);
        speak_data->text = nullptr;
@@ -483,7 +483,7 @@ int ttsd_data_reset_used_voice(unsigned int uid, ttsd_used_voice_cb callback)
        return TTSD_ERROR_NONE;
 }
 
-speak_data_s* ttsd_data_create_speak_data(const char* text, const char* language, int voice_type, const char* ptts_id, int speed, int pitch, double volume, double background_volume_ratio, int utt_id, bool is_silent, unsigned int duration_in_msec)
+speak_data_s* ttsd_data_create_speak_data(const char* text, const char* language, int voice_type, int speed, int pitch, double volume, double background_volume_ratio, int utt_id, bool is_silent, unsigned int duration_in_msec)
 {
        speak_data_s* speak_data = new speak_data_s();
        if (nullptr == speak_data) {
@@ -505,13 +505,7 @@ speak_data_s* ttsd_data_create_speak_data(const char* text, const char* language
                speak_data->voice.language = strdup(language);
        }
 
-       if (ptts_id == NULL) {
-               speak_data->voice.ptts_id = nullptr;
-               SLOG(LOG_INFO, tts_tag(), "[DATA INFO] ptts_id of speak_data for silent generation is null");
-       } else {
-               speak_data->voice.ptts_id = strdup(ptts_id);
-       }
-
+       speak_data->voice.ptts_id = nullptr;
        speak_data->voice.type = voice_type;
 
        speak_data->synth_parameter.speed = speed;
@@ -555,8 +549,8 @@ int ttsd_data_add_speak_data(unsigned int uid, speak_data_s* data)
                return TTSD_ERROR_OUT_OF_MEMORY;
        }
 
-       SLOG(LOG_ERROR, tts_tag(), "[DATA][%p] utt_id(%d), text(%s), lang(%s), vctype(%d), speed(%d), ptts_id(%s)",
-                data, data->utt_id, data->text, data->voice.language, data->voice.type, data->synth_parameter.speed, data->voice.ptts_id == nullptr ? "NULL" : data->voice.ptts_id);
+       SLOG(LOG_ERROR, tts_tag(), "[DATA][%p] utt_id(%d), text(%s), lang(%s), vctype(%d), speed(%d)",
+                data, data->utt_id, data->text, data->voice.language, data->voice.type, data->synth_parameter.speed);
 
        if (1 == data->utt_id)
                app_data->utt_id_stopped = 0;
@@ -1013,9 +1007,9 @@ int ttsd_data_save_error_log(unsigned int uid, FILE* fp)
 
        i = 0;
        for (auto& speakData : app_data->m_speak_data) {
-               SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] lang(%s), vctype(%d), speed(%d), uttid(%d), text(%s), ptts_id(%s)",
+               SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] lang(%s), vctype(%d), speed(%d), uttid(%d), text(%s)",
                         i, speakData, speakData->voice.language, speakData->voice.type, speakData->synth_parameter.speed,
-                        speakData->utt_id, speakData->text, speakData->voice.ptts_id == nullptr ? "NULL" : speakData->voice.ptts_id);
+                        speakData->utt_id, speakData->text);
                i++;
        }
        fprintf(fp, "---------------------");
index 4205183..73fc7eb 100644 (file)
@@ -99,7 +99,7 @@ int ttsd_data_set_credential(unsigned int uid, const char* credential);
 char* ttsd_data_get_credential(unsigned int uid);
 
 /* speak data */
-speak_data_s* ttsd_data_create_speak_data(const char* text, const char* language, int voice_type, const char* ptts_id, int speed, int pitch, double volume, double bg_volume, int utt_id, bool is_silent, unsigned int duration_in_msec);
+speak_data_s* ttsd_data_create_speak_data(const char* text, const char* language, int voice_type, int speed, int pitch, double volume, double bg_volume, int utt_id, bool is_silent, unsigned int duration_in_msec);
 
 void ttsd_data_destroy_speak_data(speak_data_s* speak_data);
 
index 74ef5c9..ba65fc1 100644 (file)
@@ -67,7 +67,6 @@ static GSList* g_cur_voices = NULL;
 
 /** Callback function for voice list */
 static bool __supported_voice_cb(const char* language, int type, void* user_data);
-static bool __supported_personal_voice_cb(const char* language, const char* unique_id, void* user_data);
 
 /** Free voice list */
 static void __free_voice_list(GList* voice_list);
@@ -538,7 +537,7 @@ bool ttsd_engine_agent_is_same_engine(const char* engine_id)
        return false;
 }
 
-bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts_id, char** out_lang, int* out_type, char** out_ptts_id)
+bool ttsd_engine_select_valid_voice(const char* lang, int type, char** out_lang, int* out_type)
 {
        if (NULL == lang || NULL == out_lang || NULL == out_type) {
                return false;
@@ -550,8 +549,8 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                return false;
        }
 
-       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Select voice : input lang(%s), input type(%d), input ptts_id(%s), default lang(%s), default type(%d)",
-               (NULL == lang) ? "NULL" : lang, type, (NULL == ptts_id) ? "NULL" : ptts_id, (NULL == g_engine_info->default_lang) ? "NULL" : g_engine_info->default_lang, g_engine_info->default_vctype);
+       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Select voice : input lang(%s), input type(%d), default lang(%s), default type(%d)",
+               (NULL == lang) ? "NULL" : lang, type, (NULL == g_engine_info->default_lang) ? "NULL" : g_engine_info->default_lang, g_engine_info->default_vctype);
 
        /* case 1 : Both are default */
        if (0 == strncmp(lang, "default", strlen(lang)) && 0 == type) {
@@ -562,7 +561,6 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                }
 
                *out_type = g_engine_info->default_vctype;
-               *out_ptts_id = NULL;
                return true;
        }
 
@@ -574,15 +572,6 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                return false;
        }
 
-       if (type == TTSE_VOICE_TYPE_PERSONAL) {
-               SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] voice type is personal");
-               ret = ttsd_config_get_personal_voices_list(__supported_personal_voice_cb, &voice_list);
-               if (0 != ret) {
-                       SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] No supported personal voice");
-                       return false;
-               }
-       }
-
        bool result;
        result = false;
 
@@ -598,15 +587,6 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                        voice = iter->data;
 
                        if (0 == strncmp(voice->language, lang, strlen(lang)) &&  voice->type == type) {
-                               if (type == TTSE_VOICE_TYPE_PERSONAL && NULL!= ptts_id) {
-                                       if (0 != strcmp(voice->ptts_id, ptts_id)) {
-                                               iter = g_list_next(iter);
-                                               continue;
-                                       }
-                                       *out_ptts_id = strdup(voice->ptts_id);
-                               } else {
-                                       *out_ptts_id = NULL;
-                               }
                                *out_lang = strdup(voice->language);
                                *out_type = voice->type;
                                result = true;
@@ -616,12 +596,11 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                        iter = g_list_next(iter);
                }
 
-       } else if (0 != strncmp(lang, "default", strlen("default")) && 0 == type) {  // default type != personal_type
+       } else if (0 != strncmp(lang, "default", strlen("default")) && 0 == type) {
                /* Only type is default */
                if (0 == strncmp(lang, g_engine_info->default_lang, strlen(g_engine_info->default_lang))) {
                        *out_lang = strdup(g_engine_info->default_lang);
                        *out_type = g_engine_info->default_vctype;
-                       *out_ptts_id = NULL;
                        result = true;
                } else {
                        voice_s* voice_selected = NULL;
@@ -643,16 +622,14 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                        if (NULL != voice_selected) {
                                *out_lang = strdup(voice_selected->language);
                                *out_type = voice_selected->type;
-                               *out_ptts_id = NULL;
                                result = true;
                        }
                }
        } else if (0 == strncmp(lang, "default", strlen("default")) && 0 != type) {
                /* Only lang is default */
-               if (type == g_engine_info->default_vctype) { // default type != personal_type
+               if (type == g_engine_info->default_vctype) {
                        *out_lang = strdup(g_engine_info->default_lang);
                        *out_type = g_engine_info->default_vctype;
-                       *out_ptts_id = NULL;
                        result = true;
                } else {
                        voice_s* voice_selected = NULL;
@@ -664,12 +641,6 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                                if (0 == strncmp(voice->language, g_engine_info->default_lang, strlen(g_engine_info->default_lang))) {
                                        voice_selected = voice;
                                        if (voice->type == type) {
-                                               if (type == TTSE_VOICE_TYPE_PERSONAL && NULL != ptts_id) {
-                                                       if (0 != strcmp(voice->ptts_id, ptts_id)) {
-                                                               iter = g_list_next(iter);
-                                                               continue;
-                                                       }
-                                               }
                                                voice_selected = voice;
                                                break;
                                        }
@@ -680,21 +651,13 @@ bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts
                        if (NULL != voice_selected) {
                                *out_lang = strdup(voice->language);
                                *out_type = voice_selected->type;
-                               if (type == TTSE_VOICE_TYPE_PERSONAL && NULL != voice->ptts_id) {
-                                       *out_ptts_id = strdup(voice->ptts_id);
-                               } else {
-                                       *out_ptts_id = NULL;
-                               }
                                result = true;
                        }
                }
        }
 
        if (true == result) {
-               if (NULL != ptts_id)
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Selected voice : lang(%s), type(%d), ptts_id(%s)", *out_lang, *out_type, *out_ptts_id);
-               else
-                       SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Selected voice : lang(%s), type(%d)", *out_lang, *out_type);
+               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Selected voice : lang(%s), type(%d)", *out_lang, *out_type);
        }
 
        __free_voice_list(voice_list);
@@ -1011,7 +974,7 @@ int ttsd_engine_unload_voice(const char* lang, const int vctype)
        return TTSD_ERROR_NONE;
 }
 
-int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* ptts_id, const char* text, int speed, const char* appid, const char* credential, void* user_param)
+int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* text, int speed, const char* appid, const char* credential, void* user_param)
 {
        if (NULL == lang || NULL == text) {
                SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Invalid parameter");
@@ -1027,8 +990,7 @@ int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* ptts_i
        /* select voice for default */
        char* temp_lang = NULL;
        int temp_type;
-       char* temp_ptts_id = NULL;
-       if (true != ttsd_engine_select_valid_voice(lang, vctype, ptts_id, &temp_lang, &temp_type, &temp_ptts_id)) {
+       if (true != ttsd_engine_select_valid_voice(lang, vctype, &temp_lang, &temp_type)) {
                SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to select default voice");
                if (NULL != temp_lang) {
                        free(temp_lang);
@@ -1036,8 +998,8 @@ int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* ptts_i
                }
                return TTSD_ERROR_INVALID_VOICE;
        } else {
-               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Start synthesis : language(%s), type(%d), ptts_id(%s), speed(%d), text(%s), credential(%s)",
-                       (NULL == temp_lang) ? "NULL" : temp_lang, temp_type, (NULL == temp_ptts_id) ? "NULL" : temp_ptts_id, speed, (NULL == text) ? "NULL" : text, (NULL == credential) ? "NULL" : credential);
+               SECURE_SLOG(LOG_DEBUG, tts_tag(), "[Engine Agent] Start synthesis : language(%s), type(%d), speed(%d), text(%s), credential(%s)",
+                       (NULL == temp_lang) ? "NULL" : temp_lang, temp_type, speed, (NULL == text) ? "NULL" : text, (NULL == credential) ? "NULL" : credential);
        }
 
        int temp_speed;
@@ -1102,31 +1064,6 @@ bool __supported_voice_cb(const char* language, int type, void* user_data)
        }
        voice->language = strdup(language);
        voice->type = type;
-       voice->ptts_id = NULL;
-
-       *voice_list = g_list_append(*voice_list, voice);
-
-       return true;
-}
-
-bool __supported_personal_voice_cb(const char* language, const char* unique_id, void* user_data)
-{
-       GList** voice_list = (GList**)user_data;
-
-       if (NULL == voice_list) {
-               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Input parameter is NULL in voice list callback!!!!");
-               return false;
-       }
-
-       voice_s* voice = calloc(1, sizeof(voice_s));
-       if (NULL == voice) {
-               SLOG(LOG_ERROR, tts_tag(), "[Engine Agent ERROR] Fail to allocate memory");
-               return false;
-       }
-
-       voice->language = strdup(language);
-       voice->type = TTSE_VOICE_TYPE_PERSONAL;
-       voice->ptts_id = strdup(unique_id);
 
        *voice_list = g_list_append(*voice_list, voice);
 
@@ -1302,10 +1239,6 @@ void __free_voice_list(GList* voice_list)
                                        free(data->language);
                                        data->language = NULL;
                                }
-                               if (NULL != data->ptts_id) {
-                                       free(data->ptts_id);
-                                       data->ptts_id = NULL;
-                               }
                                free(data);
                                data = NULL;
                        }
index fe2bb37..a84ccbf 100644 (file)
@@ -48,7 +48,7 @@ int ttsd_engine_agent_unload_current_engine();
 /** Get state of current engine to need network */
 bool ttsd_engine_agent_need_network();
 
-bool ttsd_engine_select_valid_voice(const char* lang, int type, const char* ptts_id, char** out_lang, int* out_type, char** out_ptts_id);
+bool ttsd_engine_select_valid_voice(const char* lang, int type, char** out_lang, int* out_type);
 
 bool ttsd_engine_agent_is_same_engine(const char* engine_id);
 
@@ -81,7 +81,7 @@ int ttsd_engine_load_voice(const char* lang, int vctype);
 
 int ttsd_engine_unload_voice(const char* lang, int vctype);
 
-int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* ptts_id, const char* text, int speed, const char* appid, const char* credential, void* user_param);
+int ttsd_engine_start_synthesis(const char* lang, int vctype, const char* text, int speed, const char* appid, const char* credential, void* user_param);
 
 int ttsd_engine_cancel_synthesis();
 
index 62a15a5..757b049 100644 (file)
@@ -123,9 +123,8 @@ static void write_debugger_information(speak_data_s *speak_data, const char *app
 
        char* temp_lang = NULL;
        int temp_type;
-       char* temp_ptts_id = NULL;
-       if (true != ttsd_engine_select_valid_voice(speak_data->voice.language, speak_data->voice.type, NULL, &temp_lang,
-                                                                                          &temp_type, &temp_ptts_id)) {
+       if (true != ttsd_engine_select_valid_voice(speak_data->voice.language, speak_data->voice.type, &temp_lang,
+                                                                                          &temp_type)) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to select default voice");
        } else {
                char value_buffer[2048] = {0, };
@@ -196,8 +195,8 @@ static void __synthesis(unsigned int uid)
 
                SLOG(LOG_INFO, tts_tag(), "-----------------------------------------------------------");
                SLOG(LOG_INFO, tts_tag(), "ID : uid (%u), uttid(%d) ", g_utt.uid, g_utt.uttid);
-               SLOG(LOG_INFO, tts_tag(), "Voice : language(%s), type(%d), ptts_id(%s), speed(%d)", speak_data->voice.language,
-                       speak_data->voice.type, speak_data->voice.ptts_id, speak_data->synth_parameter.speed);
+               SLOG(LOG_INFO, tts_tag(), "Voice : language(%s), type(%d), speed(%d)", speak_data->voice.language,
+                       speak_data->voice.type, speak_data->synth_parameter.speed);
                SLOG(LOG_INFO, tts_tag(), "Text : %s", speak_data->text);
                SLOG(LOG_INFO, tts_tag(), "Credential : %s", credential);
                SLOG(LOG_INFO, tts_tag(), "-----------------------------------------------------------");
@@ -214,7 +213,7 @@ static void __synthesis(unsigned int uid)
                        SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] * FAIL to set personal tts id !!!! * ");
                }
 
-               ret = ttsd_engine_start_synthesis(speak_data->voice.language, speak_data->voice.type, speak_data->voice.ptts_id, speak_data->text,
+               ret = ttsd_engine_start_synthesis(speak_data->voice.language, speak_data->voice.type, speak_data->text,
                                                                                speak_data->synth_parameter.speed, appid, credential, NULL);
                if (TTSD_ERROR_NONE != ret) {
                        SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] * FAIL to start SYNTHESIS !!!! * ");
@@ -529,10 +528,9 @@ static void __config_changed_cb(tts_config_type_e type, const char* str_param, i
 
                char* out_lang = NULL;
                int out_type;
-               char* temp_ptts_id = NULL;
                int ret = -1;
 
-               if (true == ttsd_engine_select_valid_voice(str_param, int_param, NULL, &out_lang, &out_type, &temp_ptts_id)) {
+               if (true == ttsd_engine_select_valid_voice(str_param, int_param, &out_lang, &out_type)) {
                        SLOG(LOG_ERROR, tts_tag(), "[Server] valid language : lang(%s), type(%d)", out_lang, out_type);
                        ret = ttsd_engine_agent_set_default_voice(out_lang, out_type);
                        if (0 != ret)
@@ -1096,8 +1094,7 @@ int ttsd_server_add_text(unsigned int uid, const char* text, const char* lang, i
        /* check valid voice */
        char* temp_lang = NULL;
        int temp_type;
-       char* temp_ptts_id = NULL;
-       if (true != ttsd_engine_select_valid_voice((const char*)lang, voice_type, NULL, &temp_lang, &temp_type, &temp_ptts_id)) {
+       if (true != ttsd_engine_select_valid_voice((const char*)lang, voice_type, &temp_lang, &temp_type)) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to select valid voice");
                if (NULL != temp_lang) {
                        free(temp_lang);
@@ -1111,7 +1108,7 @@ int ttsd_server_add_text(unsigned int uid, const char* text, const char* lang, i
                return TTSD_ERROR_INVALID_VOICE;
        }
 
-       speak_data_s* speak_data = ttsd_data_create_speak_data(text, lang, voice_type, NULL, speed, 0, -1.0, -1.0, utt_id, false, 0);
+       speak_data_s* speak_data = ttsd_data_create_speak_data(text, lang, voice_type, speed, 0, -1.0, -1.0, utt_id, false, 0);
        if (NULL == speak_data) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to allocate memory");
                if (NULL != temp_lang) {
@@ -1187,9 +1184,8 @@ int ttsd_server_add_text_with_synthesis_parameter(unsigned int uid, const char*
 
        /* check valid voice */
        char* temp_lang = NULL;
-       char* temp_ptts_id = NULL;
        int temp_type;
-       if (true != ttsd_engine_select_valid_voice((const char*)lang, voice_type, ptts_id, &temp_lang, &temp_type, &temp_ptts_id)) {
+       if (true != ttsd_engine_select_valid_voice((const char*)lang, voice_type, &temp_lang, &temp_type)) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to select valid voice");
                if (NULL != temp_lang) {
                        free(temp_lang);
@@ -1203,7 +1199,7 @@ int ttsd_server_add_text_with_synthesis_parameter(unsigned int uid, const char*
                return TTSD_ERROR_INVALID_VOICE;
        }
 
-       speak_data_s* speak_data = ttsd_data_create_speak_data(text, lang, voice_type, ptts_id, speed, pitch, volume, background_volume_ratio, utt_id, false, 0);
+       speak_data_s* speak_data = ttsd_data_create_speak_data(text, lang, voice_type, speed, pitch, volume, background_volume_ratio, utt_id, false, 0);
        if (NULL == speak_data) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to allocate memory");
                if (NULL != temp_lang) {
@@ -1277,7 +1273,7 @@ int ttsd_server_add_silent_utterance(unsigned int uid, unsigned int duration_in_
                return TTSD_ERROR_INVALID_PARAMETER;
        }
 
-       speak_data_s* speak_data = ttsd_data_create_speak_data(NULL, NULL, 0, NULL, 0, 0, -1.0, -1.0, utt_id, true, duration_in_msec);
+       speak_data_s* speak_data = ttsd_data_create_speak_data(NULL, NULL, 0, 0, 0, -1.0, -1.0, utt_id, true, duration_in_msec);
        if (NULL == speak_data) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to allocate memory");
                return TTSD_ERROR_OPERATION_FAILED;