From: Ji-hoon Lee Date: Mon, 16 Sep 2019 06:21:51 +0000 (+0900) Subject: Apply logic for supporting preprocessing feature X-Git-Tag: submit/tizen/20190930.111916~2^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc2db4c9ef923a7c3bb968917a2b648ea48e8dae;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Apply logic for supporting preprocessing feature Change-Id: Ie6941d6dcd881fa92430358319ecd42f5583521e --- diff --git a/inc/multi_assistant_main.h b/inc/multi_assistant_main.h index 4ca15c0..89cad53 100644 --- a/inc/multi_assistant_main.h +++ b/inc/multi_assistant_main.h @@ -63,6 +63,7 @@ #define MA_METHOD_UPDATE_VOICE_FEEDBACK_STATE "ma_method_update_voice_feedback_state" #define MA_METHOD_SEND_ASSISTANT_SPECIFIC_COMMAND "ma_method_send_assistant_specific_command" #define MA_METHOD_SET_BACKGROUND_VOLUME "ma_method_set_background_volume" +#define MA_METHOD_SET_PREPROCESSING_ALLOW_MODE "ma_method_set_preprocessing_allow_mode" #define MA_METHOD_ERROR "ma_method_error" #define MA_UI_METHOD_INITIALIZE "ma_ui_method_initialize" diff --git a/inc/multi_assistant_service.h b/inc/multi_assistant_service.h index c3b1c69..60b0361 100644 --- a/inc/multi_assistant_service.h +++ b/inc/multi_assistant_service.h @@ -53,6 +53,8 @@ int mas_client_send_assistant_specific_command(int pid, const char *command); int mas_client_set_background_volume(int pid, double ratio); +int mas_client_set_preprocessing_allow_mode(int pid, int mode, const char* appid); + int mas_client_update_recognition_result(int pid, int result); int mas_ui_client_initialize(int pid); @@ -85,6 +87,27 @@ int mas_launch_client_by_appid(const char *appid, CLIENT_LAUNCH_MODE launch_mode int mas_process_voice_key_event(bool pressed); +typedef enum { + PREPROCESSING_STATE_NONE, + PREPROCESSING_STATE_WAKEUP_PREPROCESS_ENABLED, + PREPROCESSING_STATE_WAKEUP_PREPROCESS_DISABLED, + PREPROCESSING_STATE_PREPROCESSING_UTTERANCE, + PREPROCESSING_STATE_PREPROCESSING_FOLLOW_UP, +} PREPROCESSING_STATE; + +typedef enum { + PREPROCESSING_STATE_EVENT_WAKEUP, + PREPROCESSING_STATE_EVENT_ACTIVE_ASSISTANT_LAUNCHED, + PREPROCESSING_STATE_EVENT_PREPROCESSING_ALLOW_MODE_CHANGED, + PREPROCESSING_STATE_EVENT_UTTERANCE_STREAMING_STARTED, + PREPROCESSING_STATE_EVENT_FOLLOW_UP_STREAMING_STARTED, + PREPROCESSING_STATE_EVENT_PREPROCESSING_SUCCEEDED, + PREPROCESSING_STATE_EVENT_PREPROCESSING_FAILED, +} PREPROCESSING_STATE_EVENT; + +int mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT event); + + #ifdef __cplusplus } #endif diff --git a/inc/multi_assistant_service_plugin.h b/inc/multi_assistant_service_plugin.h index 7b686d4..43db0f4 100644 --- a/inc/multi_assistant_service_plugin.h +++ b/inc/multi_assistant_service_plugin.h @@ -65,6 +65,8 @@ int multi_assistant_service_plugin_set_background_volume(const char *appid, doub int multi_assistant_service_plugin_update_recognition_result(const char* appid, int result); +int multi_assistant_service_plugin_set_preprocessing_allow_mode(const char* appid, int mode, const char* preprocessing_appid); + int multi_assistant_service_plugin_process_event(int event, void* data, int len); int multi_assistant_service_plugin_start_streaming_utterance_data(void); diff --git a/plugins/wakeup-manager/inc/wakeup_manager.h b/plugins/wakeup-manager/inc/wakeup_manager.h index 54bac7f..7d5e57b 100644 --- a/plugins/wakeup-manager/inc/wakeup_manager.h +++ b/plugins/wakeup-manager/inc/wakeup_manager.h @@ -24,6 +24,8 @@ #include "wakeup_audio_manager.h" #include "wakeup_policy_default.h" +#include "multi_assistant_common.h" + #include #include diff --git a/src/multi_assistant_dbus.c b/src/multi_assistant_dbus.c index 0ca4dec..fd8ffcc 100644 --- a/src/multi_assistant_dbus.c +++ b/src/multi_assistant_dbus.c @@ -760,6 +760,9 @@ static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handle } else if (dbus_message_is_method_call(msg, MA_SERVER_SERVICE_INTERFACE, MA_METHOD_SET_BACKGROUND_VOLUME)) { ma_service_dbus_set_background_volume(g_conn_listener, msg); + } else if (dbus_message_is_method_call(msg, MA_SERVER_SERVICE_INTERFACE, MA_METHOD_SET_PREPROCESSING_ALLOW_MODE)) { + ma_service_dbus_set_preprocessing_allow_mode(g_conn_listener, msg); + } else if (dbus_message_is_method_call(msg, MA_SERVER_SERVICE_INTERFACE, MA_UI_METHOD_INITIALIZE)) { ma_service_ui_dbus_initialize(g_conn_listener, msg); diff --git a/src/multi_assistant_dbus_server.c b/src/multi_assistant_dbus_server.c index f26b8db..b79c157 100644 --- a/src/multi_assistant_dbus_server.c +++ b/src/multi_assistant_dbus_server.c @@ -562,6 +562,45 @@ int ma_service_dbus_set_background_volume(DBusConnection* conn, DBusMessage* msg return 0; } +int ma_service_dbus_set_preprocessing_allow_mode(DBusConnection* conn, DBusMessage* msg) +{ + DBusError err; + dbus_error_init(&err); + + int pid; + int ret = 0; + int mode; + char* app_id; + + dbus_message_get_args(msg, &err, + DBUS_TYPE_INT32, &pid, + DBUS_TYPE_INT32, &mode, + DBUS_TYPE_STRING, &app_id, + DBUS_TYPE_INVALID); + + MAS_LOGD("[DEBUG] MAS SET PREPROCESSING ALLOW MODE"); + + if (dbus_error_is_set(&err)) { + MAS_LOGE("[IN ERROR] mas set preprocessing allow mode : Get arguments error (%s)", err.message); + dbus_error_free(&err); + ret = -1; //MAS_ERROR_OPERATION_FAILED; + } else { + char* temp_app_id = NULL; + if (NULL != app_id && strcmp("#NULL", app_id)) { + temp_app_id = strdup(app_id); + } + MAS_LOGD("[IN] mas set preprocessing allow mode : pid(%d), mode(%d), app_id(%s)", pid, mode, temp_app_id); + ret = mas_client_set_preprocessing_allow_mode(pid, mode, temp_app_id); + if (NULL != temp_app_id) + free(temp_app_id); + } + + MAS_LOGD("<<<<<"); + MAS_LOGD(" "); + + return 0; +} + int ma_service_ui_dbus_initialize(DBusConnection* conn, DBusMessage* msg) { DBusError err; diff --git a/src/multi_assistant_dbus_server.h b/src/multi_assistant_dbus_server.h index f949784..f988b18 100644 --- a/src/multi_assistant_dbus_server.h +++ b/src/multi_assistant_dbus_server.h @@ -49,6 +49,8 @@ int ma_service_dbus_send_assistant_specific_command(DBusConnection* conn, DBusMe int ma_service_dbus_set_background_volume(DBusConnection* conn, DBusMessage* msg); +int ma_service_dbus_set_preprocessing_allow_mode(DBusConnection* conn, DBusMessage* msg); + int ma_service_ui_dbus_initialize(DBusConnection* conn, DBusMessage* msg); int ma_service_ui_dbus_deinitialize(DBusConnection* conn, DBusMessage* msg); diff --git a/src/multi_assistant_service.c b/src/multi_assistant_service.c index e2f4db0..38d28f8 100644 --- a/src/multi_assistant_service.c +++ b/src/multi_assistant_service.c @@ -55,6 +55,9 @@ typedef struct { char wakeup_engine[MAX_APPID_LEN]; char supported_language[MAX_SUPPORTED_LANGUAGES_NUM][MAX_SUPPORTED_LANGUAGE_LEN]; bool custom_ui_option; + + ma_preprocessing_allow_mode_e preprocessing_allow_mode; + char preprocessing_allow_appid[MAX_APPID_LEN]; } ma_client_info; static ma_client_info g_maclient_info[MAX_MACLIENT_INFO_NUM]; @@ -67,6 +70,8 @@ typedef struct { static int g_current_maclient_info = 0; static const char *g_wakeup_maclient_appid = NULL; +static PREPROCESSING_STATE g_current_preprocessing_state = PREPROCESSING_STATE_NONE; + /* client list */ static GSList* g_client_list = NULL; @@ -156,6 +161,44 @@ ma_client_s* ma_client_find_by_pid(int pid) return NULL; } +bool check_preprocessing_assistant_exists() +{ + bool ret = false; + + char* vconf_str = vconf_get_str(WAKEUP_SETTINGS_KEY_PREPROCESSING_ASSISTANT_APPID); + if (vconf_str) { + for (int loop = 0; loop < MAX_MACLIENT_INFO_NUM; loop++) { + if (g_maclient_info[loop].used && g_maclient_info[loop].appid) { + if (strncmp(vconf_str, g_maclient_info[loop].appid, MAX_APPID_LEN) == 0) { + ret = true; + } + } + } + free(vconf_str); + vconf_str = NULL; + } + + return ret; +} + +bool is_current_preprocessing_assistant(const char* appid) +{ + if (NULL == appid) return false; + + bool ret = false; + + char* vconf_str = vconf_get_str(WAKEUP_SETTINGS_KEY_PREPROCESSING_ASSISTANT_APPID); + if (vconf_str) { + if (strncmp(vconf_str, appid, MAX_APPID_LEN) == 0) { + ret = true; + } + free(vconf_str); + vconf_str = NULL; + } + + return ret; +} + int mas_client_initialize(int pid) { MAS_LOGD("[Enter] pid(%d)", pid); @@ -199,6 +242,7 @@ int mas_client_initialize(int pid) g_wakeup_maclient_appid = NULL; mas_client_send_preprocessing_information(pid); mas_client_activate(pid); + mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_ACTIVE_ASSISTANT_LAUNCHED); } else { MAS_LOGE("[ERROR] g_wakeup_maclient_appid and appid differ : %s %s", (g_wakeup_maclient_appid ? g_wakeup_maclient_appid : "NULL"), appid); @@ -289,10 +333,17 @@ int mas_client_activate(int pid) int ret = -1; MAS_LOGD("[Enter] pid(%d)", pid); - if (check_pid_is_current_maclient(pid)) { - MAS_LOGD("pid %d matches with current MA Client, activating", pid); - ret = masc_dbus_active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); - } + ret = masc_dbus_active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); + + return ret; +} + +int mas_client_deactivate(int pid) +{ + int ret = -1; + MAS_LOGD("[Enter] pid(%d)", pid); + + ret = masc_dbus_active_state_change(pid, MA_ACTIVE_STATE_INACTIVE); return ret; } @@ -342,12 +393,15 @@ int mas_client_start_streaming_audio_data(int pid, int type) switch(type) { case MA_AUDIO_STREAMING_DATA_TYPE_CURRENT_UTTERANCE: ret = multi_assistant_service_plugin_start_streaming_utterance_data(); + mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_UTTERANCE_STREAMING_STARTED); break; case MA_AUDIO_STREAMING_DATA_TYPE_PREVIOUS_UTTERANCE: ret = multi_assistant_service_plugin_start_streaming_previous_utterance_data(); + /* Preprocessing is not required for previous utterance streaming */ break; case MA_AUDIO_STREAMING_DATA_TYPE_FOLLOW_UP_SPEECH: ret = multi_assistant_service_plugin_start_streaming_follow_up_data(); + mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_FOLLOW_UP_STREAMING_STARTED); break; } return ret; @@ -388,6 +442,30 @@ int mas_client_set_background_volume(int pid, double ratio) return 0; } +int mas_client_set_preprocessing_allow_mode(int pid, int mode, const char* appid) +{ + const char* pid_appid = NULL; + char buf[MAX_APPID_LEN] = {'\0',}; + if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) { + buf[MAX_APPID_LEN - 1] = '\0'; + pid_appid = buf; + } + + for (int loop = 0; loop < MAX_MACLIENT_INFO_NUM; loop++) { + if (g_maclient_info[loop].used && g_maclient_info[loop].appid) { + if (strncmp(pid_appid, g_maclient_info[loop].appid, MAX_APPID_LEN) == 0) { + g_maclient_info[loop].preprocessing_allow_mode = mode; + strncpy(g_maclient_info[loop].preprocessing_allow_appid, appid, MAX_APPID_LEN); + g_maclient_info[loop].preprocessing_allow_appid[MAX_APPID_LEN - 1] = '\0'; + } + } + } + + mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_PREPROCESSING_ALLOW_MODE_CHANGED); + + return 0; +} + int mas_client_update_recognition_result(int pid, int state) { multi_assistant_service_plugin_update_recognition_result(NULL, state); @@ -423,10 +501,9 @@ int mas_ui_client_change_assistant(const char* appid) mas_set_current_client_by_appid(appid); int pid = mas_get_client_pid_by_appid(appid); if (pid != -1) { - /* Bring MA client to foreground - is there a better way instead of launching? */ - mas_launch_client_by_appid(appid, CLIENT_LAUNCH_MODE_ACTIVATION); + mas_bring_client_to_foreground(appid); mas_client_send_preprocessing_information(pid); - masc_dbus_active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); + mas_client_activate(pid); MAS_LOGD("MA Client with appid %s exists, requesting speech data", (appid ? appid : "NULL")); /* int ret = multi_assistant_service_plugin_start_streaming_utterance_data(); @@ -474,6 +551,8 @@ int __mas_assistant_info_cb(const char* appid, const char* name, const char* ico } if (-1 != index) { g_maclient_info[index].used = true; + g_maclient_info[index].preprocessing_allow_mode = MA_PREPROCESSING_ALLOW_NONE; + g_maclient_info[index].preprocessing_allow_appid[0] = '\0'; MAS_LOGD("app_id(%s)", appid); strncpy(g_maclient_info[index].appid, appid, MAX_APPID_LEN); g_maclient_info[index].appid[MAX_APPID_LEN - 1] = '\0'; @@ -796,9 +875,7 @@ int mas_set_current_client_by_wakeup_word(const char *wakeup_word) if (g_current_maclient_info != prev_selection) { if (prev_selection >= 0 && prev_selection < MAX_MACLIENT_INFO_NUM) { - masc_dbus_active_state_change( - mas_get_client_pid_by_appid(g_maclient_info[prev_selection].appid), - MA_ACTIVE_STATE_INACTIVE); + mas_client_deactivate(mas_get_client_pid_by_appid(g_maclient_info[prev_selection].appid)); } } @@ -823,9 +900,7 @@ int mas_set_current_client_by_appid(const char *appid) if (g_current_maclient_info != prev_selection) { if (prev_selection >= 0 && prev_selection < MAX_MACLIENT_INFO_NUM) { - masc_dbus_active_state_change( - mas_get_client_pid_by_appid(g_maclient_info[prev_selection].appid), - MA_ACTIVE_STATE_INACTIVE); + mas_client_deactivate(mas_get_client_pid_by_appid(g_maclient_info[prev_selection].appid)); } } @@ -846,13 +921,10 @@ int mas_launch_client_by_appid(const char *appid, CLIENT_LAUNCH_MODE launch_mode return -1; } - int result; - if (CLIENT_LAUNCH_MODE_PRELAUNCH == launch_mode) { - result = aul_svc_set_background_launch(b, TRUE); - if (result < AUL_R_OK) { - MAS_LOGE("ERROR : aul_svc_set_background_launch failed. app_id [%s] bundle[%p] result[%d : %s]", - appid, b, result, get_error_message(result)); - } + int result = aul_svc_set_background_launch(b, TRUE); + if (result < AUL_R_OK) { + MAS_LOGE("ERROR : aul_svc_set_background_launch failed. app_id [%s] bundle[%p] result[%d : %s]", + appid, b, result, get_error_message(result)); } result = aul_launch_app(appid, b); @@ -881,6 +953,33 @@ int mas_launch_client_by_appid(const char *appid, CLIENT_LAUNCH_MODE launch_mode return result; } +int mas_bring_client_to_foreground(const char* appid) +{ + /* Bring MA client to foreground - is there a better way other than launching? */ + if (NULL == appid || 0 == strlen(appid)) { + MAS_LOGE("appid invalid, failed launching MA Client"); + return -1; + } + + bundle *b = NULL; + b = bundle_create(); + if (NULL == b) { + MAS_LOGE("Failed creating bundle for aul operation"); + return -1; + } + + int result = aul_launch_app(appid, b); + if (result < AUL_R_OK) { + MAS_LOGE("ERROR : aul_launch_app failed. app_id [%s] bundle[%p] result[%d : %s]", + appid, b, result, get_error_message(result)); + } + + if (b) bundle_free(b); + b = NULL; + + return result; +} + int mas_launch_client_by_wakeup_word(const char *wakeup_word) { const char *appid = mas_get_client_appid_by_wakeup_word(wakeup_word); @@ -898,6 +997,81 @@ int mas_process_voice_key_event(bool pressed) return 0; } +ma_preprocessing_allow_mode_e get_preprocessing_allow_mode(const char* appid) +{ + for (int loop = 0; loop < MAX_MACLIENT_INFO_NUM; loop++) { + if (g_maclient_info[loop].used && g_maclient_info[loop].appid) { + if (strncmp(appid, g_maclient_info[loop].appid, MAX_APPID_LEN) == 0) { + return g_maclient_info[loop].preprocessing_allow_mode; + } + } + } + return MA_PREPROCESSING_ALLOW_NONE; +} + +int mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT event) +{ + const char* current_maclient_appid = NULL; + const char* preprocessing_allow_appid = NULL; + if (g_current_maclient_info >= 0 && g_current_maclient_info < MAX_MACLIENT_INFO_NUM) { + current_maclient_appid = g_maclient_info[g_current_maclient_info].appid; + preprocessing_allow_appid = g_maclient_info[g_current_maclient_info].preprocessing_allow_appid; + } + ma_preprocessing_allow_mode_e mode = get_preprocessing_allow_mode(current_maclient_appid); + + switch (event) { + case PREPROCESSING_STATE_EVENT_WAKEUP: + case PREPROCESSING_STATE_EVENT_ACTIVE_ASSISTANT_LAUNCHED: + { + if (!check_preprocessing_assistant_exists()) { + mas_bring_client_to_foreground(current_maclient_appid); + } + } + /* Intentionally omitted break statement here */ + case PREPROCESSING_STATE_EVENT_PREPROCESSING_ALLOW_MODE_CHANGED: + { + g_current_preprocessing_state = PREPROCESSING_STATE_WAKEUP_PREPROCESS_DISABLED; + if (MA_PREPROCESSING_ALLOW_UTTERANCE == mode || + MA_PREPROCESSING_ALLOW_ALL == mode) { + if (is_current_preprocessing_assistant(preprocessing_allow_appid)) { + g_current_preprocessing_state = PREPROCESSING_STATE_WAKEUP_PREPROCESS_ENABLED; + } + } + } + break; + case PREPROCESSING_STATE_EVENT_UTTERANCE_STREAMING_STARTED: + { + if (PREPROCESSING_STATE_WAKEUP_PREPROCESS_ENABLED == g_current_preprocessing_state) { + g_current_preprocessing_state = PREPROCESSING_STATE_PREPROCESSING_UTTERANCE; + } else if (PREPROCESSING_STATE_WAKEUP_PREPROCESS_DISABLED == g_current_preprocessing_state) { + mas_bring_client_to_foreground(current_maclient_appid); + g_current_preprocessing_state = PREPROCESSING_STATE_NONE; + } + } + break; + case PREPROCESSING_STATE_EVENT_FOLLOW_UP_STREAMING_STARTED: + { + if (MA_PREPROCESSING_ALLOW_FOLLOW_UP == mode || + MA_PREPROCESSING_ALLOW_ALL == mode) { + g_current_preprocessing_state = PREPROCESSING_STATE_PREPROCESSING_FOLLOW_UP; + } + } + break; + case PREPROCESSING_STATE_EVENT_PREPROCESSING_SUCCEEDED: + { + g_current_preprocessing_state = PREPROCESSING_STATE_NONE; + } + break; + case PREPROCESSING_STATE_EVENT_PREPROCESSING_FAILED: + { + mas_bring_client_to_foreground(current_maclient_appid); + g_current_preprocessing_state = PREPROCESSING_STATE_NONE; + } + break; + } + return 0; +} + bool service_app_create(void *data) { // Todo: add your code here. diff --git a/src/multi_assistant_service_plugin.c b/src/multi_assistant_service_plugin.c index 4017c97..ac5b4ab 100644 --- a/src/multi_assistant_service_plugin.c +++ b/src/multi_assistant_service_plugin.c @@ -94,7 +94,7 @@ Eina_Bool __send_result(void *data) } #endif /* -TEST_CODE */ -Eina_Bool __launch_assistant_by_wakeup_appid_timer(char* appid) +Eina_Bool process_wakeup_event_by_appid_timer(char* appid) { MAS_LOGD("[ENTER] appid(%s)", appid); @@ -109,14 +109,13 @@ Eina_Bool __launch_assistant_by_wakeup_appid_timer(char* appid) if (ui_panel_enabled) masc_ui_dbus_change_assistant(appid); if ((pid = mas_get_client_pid_by_appid(appid)) != -1) { mas_client_send_preprocessing_information(pid); - masc_dbus_active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); - /* Bring MA client to foreground - is there a better way instead of launching? */ - mas_launch_client_by_appid(appid, CLIENT_LAUNCH_MODE_ACTIVATION); + mas_client_activate(pid); } else { // Appropriate MA Client not available, trying to launch new one MAS_LOGD("MA Client with appid %s does not exist, launching client", appid); mas_launch_client_by_appid(appid, CLIENT_LAUNCH_MODE_ACTIVATION); } + mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_WAKEUP); if (appid) free(appid); @@ -124,14 +123,14 @@ Eina_Bool __launch_assistant_by_wakeup_appid_timer(char* appid) return ECORE_CALLBACK_CANCEL; } -Eina_Bool __launch_assistant_by_wakeup_word_timer(char* wakeup_word) +Eina_Bool process_wakeup_event_by_word_timer(char* wakeup_word) { MAS_LOGD("[ENTER]"); if (!wakeup_word) return EINA_FALSE; const char* appid = mas_get_client_appid_by_wakeup_word(wakeup_word); - __launch_assistant_by_wakeup_appid_timer(strdup(appid)); + process_wakeup_event_by_appid_timer(strdup(appid)); if (wakeup_word) free(wakeup_word); @@ -209,11 +208,11 @@ static void __wakeup_event_cb(wakeup_event_info wakeup_info, void* user_data) #endif /* - TEST_CODE */ if (wakeup_info.wakeup_appid) { ecore_thread_main_loop_begin(); - ecore_timer_add(0.0f, __launch_assistant_by_wakeup_appid_timer, (void*)strdup(wakeup_info.wakeup_appid)); + ecore_timer_add(0.0f, process_wakeup_event_by_appid_timer, (void*)strdup(wakeup_info.wakeup_appid)); ecore_thread_main_loop_end(); } else if (wakeup_info.wakeup_word) { ecore_thread_main_loop_begin(); - ecore_timer_add(0.0f, __launch_assistant_by_wakeup_word_timer, (void*)strdup(wakeup_info.wakeup_word)); + ecore_timer_add(0.0f, process_wakeup_event_by_word_timer, (void*)strdup(wakeup_info.wakeup_word)); ecore_thread_main_loop_end(); }