int sttd_server_finalize(int uid)
{
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter Finalize");
+
/* check if uid is valid */
app_state_e state;
if (0 != sttd_client_get_state(uid, &state)) {
}
}
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] stt_cancel is invoked while state is (%d)", state);
+
if (0 != sttd_engine_agent_recognize_cancel(uid)) {
SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to cancel recognition");
}
ecore_timer_add(0, __quit_ecore_loop, NULL);
}
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End Finalize");
+
return STTD_ERROR_NONE;
}
g_processing_timer = NULL;
}
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter __time_out_for_processing");
+
/* current uid */
int uid = stt_client_get_current_recognition();
if (0 == uid) return EINA_FALSE;
+ SLOG(LOG_INFO, TAG_STTD, "[Server Info] stt cancel is invoked by timeout for processing");
+
/* Cancel engine */
int ret = sttd_engine_agent_recognize_cancel();
if (0 != ret) {
stt_client_unset_current_recognition();
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End __time_out_for_processing");
+
return EINA_FALSE;
}
int sttd_server_cancel(int uid)
{
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] Enter sttd_server_cancel");
+
/* check if uid is valid */
app_state_e state;
if (0 != sttd_client_get_state(uid, &state)) {
/* change uid state */
sttd_client_set_state(uid, APP_STATE_READY);
+ SLOG(LOG_INFO, TAG_STTD, "[Server Info] stt cancel is invoked by app's request");
+
/* cancel engine recognition */
int ret = sttd_engine_agent_recognize_cancel();
if (0 != ret) {
/* Notify uid state change */
sttdc_send_set_state(uid, APP_STATE_READY);
+ SLOG(LOG_INFO, TAG_STTD, "[Server INFO] End sttd_server_cancel");
+
return STTD_ERROR_NONE;
}