+tts (0.1.56) -- Wed, 20 Mar 2013
+
+ * Release version (Dongyeol Lee <dy3.lee@samsung.com>)
+
+tts (0.1.55-2) -- Wed, 20 Mar 2013
+
+ * Fix bug not to resume tts in 'pause' state (Dongyeol Lee <dy3.lee@samsung.com>)
+
+tts (0.1.55-1) -- Wed, 20 Mar 2013
+
+ * File message(IPC) is applied (Kwangyoun Kim <ky85.kim@samsung.com)
+
+tts (0.1.55) -- Mon, 04 Mar 2013
+
+ * Clean up code (Dongyeol Lee <dy3.lee@samsung.com>)
+ * Fix prevent issue (Kwangyoun Kim <ky85.kim@samsung.com>)
+
+tts (0.1.1-54)
+
+ * Fix code for synthesis by dbus
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com> Mon, 4 Mar 2013
+
+tts (0.1.1-53)
+
+ * Update smack rule
+
+ -- Kwangyoun Kim <ky85.kim@samsung.com> Wed, 27 Feb 2013
+
tts (0.1.1-52)
* Improve high CPU share
#include "tts_client.h"
#include "tts_dbus.h"
-#define MAX_TEXT_COUNT 1000
+#define MAX_TEXT_COUNT 2000
static bool g_is_daemon_started = false;
case TTS_STATE_READY:
/* Request Finalize */
ret = tts_dbus_request_finalize(client->uid);
- if (0 != ret)
- SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to request finalize");
+ if (0 != ret) {
+ SLOG(LOG_WARN, TAG_TTSC, "[ERROR] Fail to request finalize");
+ }
if (TTS_MODE_SCREEN_READER == client->mode)
g_is_sr_daemon_started = false;
else
g_is_daemon_started = false;
+ client->before_state = client->current_state;
+ client->current_state = TTS_STATE_CREATED;
+
+ ecore_timer_add(0, __tts_notify_state_changed, (void*)tts);
+
+ /* Close file message connection */
+ if (0 == tts_client_get_connected_client_count()) {
+ SLOG(LOG_DEBUG, TAG_TTSC, "Close file msg connection");
+ ret = tts_file_msg_close_connection();
+ if (0 != ret)
+ SLOG(LOG_WARN, TAG_TTSC, "[ERROR] Fail to close file message connection");
+ }
+
case TTS_STATE_CREATED:
if (NULL != g_connect_timer) {
SLOG(LOG_DEBUG, TAG_TTSC, "Connect Timer is deleted");
/* success to connect tts-daemon */
}
+ if (0 == tts_client_get_connected_client_count()) {
+ SLOG(LOG_DEBUG, TAG_TTSC, "Open file msg connection");
+ ret = tts_file_msg_open_connection();
+ if (0 != ret) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to open file message connection");
+ ecore_timer_add(0, __tts_notify_error, (void*)client->tts);
+ return EINA_FALSE;
+ }
+ }
+
client->before_state = client->current_state;
client->current_state = TTS_STATE_READY;
SLOG(LOG_DEBUG, TAG_TTSC, " ");
return TTS_ERROR_INVALID_STATE;
}
+
+ int ret;
- int ret = tts_dbus_request_finalize(client->uid);
+ ret = tts_dbus_request_finalize(client->uid);
if (0 != ret) {
SLOG(LOG_WARN, TAG_TTSC, "[ERROR] Fail to request finalize");
}
else
g_is_daemon_started = false;
-
client->before_state = client->current_state;
client->current_state = TTS_STATE_CREATED;
ecore_timer_add(0, __tts_notify_state_changed, (void*)tts);
+ /* Close file message connection */
+ if (0 == tts_client_get_connected_client_count()) {
+ SLOG(LOG_DEBUG, TAG_TTSC, "Close file msg connection");
+ ret = tts_file_msg_close_connection();
+ if (0 != ret)
+ SLOG(LOG_WARN, TAG_TTSC, "[ERROR] Fail to close file message connection");
+ }
+
SLOG(LOG_DEBUG, TAG_TTSC, "=====");
SLOG(LOG_DEBUG, TAG_TTSC, " ");
int tts_client_get_use_callback(tts_client_s* client)
{
return client->cb_ref_count;
+}
+
+int tts_client_get_connected_client_count()
+{
+ GList *iter = NULL;
+ tts_client_s *data = NULL;
+ int number = 0;
+
+ if (g_list_length(g_client_list) > 0) {
+ /* Get a first item */
+ iter = g_list_first(g_client_list);
+
+ while (NULL != iter) {
+ data = iter->data;
+ if (0 < data->current_state) {
+ number++;
+ }
+
+ /* Next item */
+ iter = g_list_next(iter);
+ }
+ }
+ return number;
}
\ No newline at end of file
int tts_client_get_use_callback(tts_client_s* client);
+int tts_client_get_connected_client_count();
+
#ifdef __cplusplus
}
#endif
#include <Ecore.h>
+#include <sys/inotify.h>
+
#include "tts_main.h"
#include "tts_dbus.h"
#include "tts_defs.h"
#define INIT_WAITING_TIME 5000
#define WAITING_TIME 1000
+#define BUFFER_SIZE 20
+
static Ecore_Fd_Handler* g_fd_handler = NULL;
static DBusConnection* g_conn = NULL;
+static Ecore_Fd_Handler* g_fd_handler_noti = NULL;
+static int g_fd_noti;
+static int g_wd_noti;
extern int __tts_cb_error(int uid, tts_error_e reason, int utt_id);
SLOG(LOG_DEBUG, TAG_TTSC, " ");
} /* TTSD_METHOD_HELLO */
+#if 0
else if (dbus_message_is_method_call(msg, if_name, TTSD_METHOD_UTTERANCE_STARTED)) {
SLOG(LOG_DEBUG, TAG_TTSC, "===== Get utterance started");
int uid, uttid;
SLOG(LOG_DEBUG, TAG_TTSC, "=====");
SLOG(LOG_DEBUG, TAG_TTSC, " ");
} /* TTSD_METHOD_SET_STATE */
+#endif
else if (dbus_message_is_method_call(msg, if_name, TTSD_METHOD_ERROR)) {
SLOG(LOG_DEBUG, TAG_TTSC, "===== Get error callback");
return ECORE_CALLBACK_PASS_ON;
}
-
int tts_dbus_open_connection()
{
if (NULL != g_conn) {
int tts_dbus_reconnect()
{
bool connected = dbus_connection_get_is_connected(g_conn);
- SLOG(LOG_DEBUG, "[DBUS] %s\n", connected ? "Connected" : "Not connected");
+ SLOG(LOG_DEBUG, TAG_TTSC, "[DBUS] %s\n", connected ? "Connected" : "Not connected");
if (false == connected) {
tts_dbus_close_connection();
return result;
}
-
int tts_dbus_request_add_text(int uid, const char* text, const char* lang, int vctype, int speed, int uttid)
{
if (NULL == text || NULL == lang) {
return result;
}
+
+
+static Eina_Bool inotify_event_callback(void* data, Ecore_Fd_Handler *fd_handler)
+{
+ SLOG(LOG_DEBUG, TAG_TTSC, "===== [File message] Inotify event call");
+
+ int length;
+
+ char buffer[sizeof(struct inotify_event) * BUFFER_SIZE];
+
+ length = read(g_fd_noti, buffer, (sizeof(struct inotify_event) * BUFFER_SIZE));
+ if (0 > length) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message] Empty Inotify event");
+ SLOG(LOG_DEBUG, TAG_TTSC, "=====");
+ SLOG(LOG_DEBUG, TAG_TTSC, " ");
+ return ECORE_CALLBACK_RENEW;
+ }
+
+ bool is_empty_file = true;
+
+ char filename[64];
+ memset(filename, 0, 64);
+ snprintf(filename, 64, "%s_%d", MESSAGE_FILE_PATH, getpid());
+ FILE *fp;
+
+ int i = 0;
+ while (i < length) {
+ char text[256];
+ char msg[256];
+ int uid, send_data;
+
+ struct inotify_event *event = (struct inotify_event *)&buffer[i];
+ i = i + sizeof(struct inotify_event) + event->len;
+
+ if (IN_CLOSE_WRITE == event->mask) {
+
+ fp = fopen(filename, "r");
+ if (NULL == fp) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message ERROR] open file failed");
+ SLOG(LOG_DEBUG, TAG_TTSC, "=====");
+ SLOG(LOG_DEBUG, TAG_TTSC, " ");
+ return ECORE_CALLBACK_RENEW;
+ }
+
+ while (NULL != fgets(text, 256, fp)) {
+ if (0 > sscanf(text, "%s %d %d", msg, &uid, &send_data)) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message] sscanf failed");
+ continue;
+ }
+ SLOG(LOG_DEBUG, TAG_TTSC, "[File message] message - %s, uid - %d, send_data - %d", msg, uid, send_data);
+ is_empty_file = false;
+
+ int uttid;
+ if (!strcmp(TTSD_METHOD_UTTERANCE_STARTED, msg)) {
+ uttid = send_data;
+ SLOG(LOG_DEBUG, TAG_TTSC, "<<<< Get Utterance started message : uid(%d), uttid(%d) \n", uid, uttid);
+ __tts_cb_utt_started(uid, uttid);
+ } else if (!strcmp(TTSD_METHOD_UTTERANCE_COMPLETED, msg)) {
+ uttid = send_data;
+ SLOG(LOG_DEBUG, TAG_TTSC, "<<<< Get Utterance completed message : uid(%d), uttid(%d) \n", uid, uttid);
+ __tts_cb_utt_completed(uid, uttid);
+
+ } else if (!strcmp(TTSD_METHOD_SET_STATE, msg)) {
+ int state = send_data;
+ SLOG(LOG_DEBUG, TAG_TTSC, "<<<< Get state change : uid(%d) , state(%d)", uid, state);
+ __tts_cb_set_state(uid, state);
+ }
+ }
+ fclose(fp);
+ } else {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message] Undefined event");
+ }
+ }
+
+ if (true == is_empty_file)
+ return ECORE_CALLBACK_PASS_ON;
+
+ fp = fopen(filename, "w+");
+ if (NULL == fp) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message ERROR] open file failed");
+ } else {
+ fclose(fp);
+ }
+
+ SLOG(LOG_DEBUG, TAG_TTSC, "=====");
+ SLOG(LOG_DEBUG, TAG_TTSC, " ");
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+int tts_file_msg_open_connection()
+{
+ /* get file notification handler */
+ int fd;
+ int wd;
+
+ fd = inotify_init();
+ if (fd < 0) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message ERROR] Fail get inotify_fd");
+ return -1;
+ }
+ g_fd_noti = fd;
+
+ int pid = getpid();
+ char path[64];
+ memset(path, 0, 64);
+ snprintf(path, 64, "%s_%d", MESSAGE_FILE_PATH, pid);
+
+ wd = inotify_add_watch(fd, path, IN_CLOSE_WRITE);
+ g_wd_noti = wd;
+ g_fd_handler_noti = ecore_main_fd_handler_add(fd, ECORE_FD_READ, (Ecore_Fd_Cb)inotify_event_callback, NULL, NULL, NULL);
+ if (NULL == g_fd_handler_noti) {
+ SLOG(LOG_ERROR, TAG_TTSC, "[File message ERROR] Fail to get handler_noti");
+ return -1;
+ }
+ return 0;
+}
+
+int tts_file_msg_close_connection()
+{
+ /* del inotify variable */
+ ecore_main_fd_handler_del(g_fd_handler_noti);
+ inotify_rm_watch(g_fd_noti, g_wd_noti);
+ close(g_fd_noti);
+
+ return 0;
+}
\ No newline at end of file
int tts_dbus_request_pause(int uid);
+
+int tts_file_msg_open_connection();
+
+int tts_file_msg_close_connection();
+
#ifdef __cplusplus
}
#endif
#define TTSD_METHOD_ERROR "ttsd_method_error"
#define TTSD_METHOD_SET_STATE "ttsd_method_set_state"
#define TTSD_METHOD_GET_STATE "ttsd_method_get_state"
+
+#define MESSAGE_FILE_PATH "/opt/home/app/.voice/tts"
/******************************************************************************************
* Message Definition for Setting
#define TTS_SETTING_METHOD_GET_ENGINE_SETTING "tts_setting_method_get_engine_setting"
#define TTS_SETTING_METHOD_SET_ENGINE_SETTING "tts_setting_method_set_engine_setting"
+#if 0
/******************************************************************************************
* Message Definition for tts-daemon internal
*******************************************************************************************/
#define TTSD_SIGNAL_NEXT_SYNTHESIS "ttsd_signal_start_synthesis"
+#endif
#ifdef __cplusplus
}
Name: tts
Summary: Text To Speech client library and daemon
-Version: 0.1.1
+Version: 0.1.56
Release: 1
Group: libs
License: Samsung
__ttsd_config_load();
/* Register system language changed callback */
- int ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LANGUAGE, __system_language_changed_cb, NULL);\r
+ int ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LANGUAGE, __system_language_changed_cb, NULL);
if (0 != ret) {
SLOG(LOG_ERROR, get_tag(), "[Config ERROR] Fail to register callback : %d", ret);
return TTSD_ERROR_OPERATION_FAILED;
SLOG(LOG_ERROR, get_tag(), "[Config ERROR] Fail to get system language : %d", ret);
return -1;
} else {
- SLOG(LOG_DEBUG, get_tag(), "[Config] System language : %s", value);
+ if (NULL == value) {
+ SLOG(LOG_ERROR, get_tag(), "[Config] Fail to get system language");
+ return -1;
+ } else {
+ SLOG(LOG_DEBUG, get_tag(), "[Config] System language : %s", value);
+
+ if (0 != strcmp(value, g_language)) {
+ if (NULL != g_callback)
+ g_callback(value, g_vc_type);
+ }
- if (0 != strcmp(value, g_language)) {
- if (NULL != g_callback)
- g_callback(value, g_vc_type);
- }
-
- if (NULL != value)
free(value);
+ }
}
}
if (TTSD_MODE_NOTIFICATION == ttsd_get_mode()) {
err_file = (char*)malloc(strlen(CONFIG_DIRECTORY) + strlen(NOTI_ERROR_FILE_NAME) + 1);
+ if (NULL == err_file) {
+ SLOG(LOG_WARN, get_tag(), "[WARNING] Fail to get error file name");
+ return -1;
+ }
strcpy(err_file, CONFIG_DIRECTORY);
strcat(err_file, NOTI_ERROR_FILE_NAME);
} else if (TTSD_MODE_SCREEN_READER == ttsd_get_mode()) {
err_file = (char*)malloc(strlen(CONFIG_DIRECTORY) + strlen(SR_ERROR_FILE_NAME) + 1);
+ if (NULL == err_file) {
+ SLOG(LOG_WARN, get_tag(), "[WARNING] Fail to get error file name");
+ return -1;
+ }
strcpy(err_file, CONFIG_DIRECTORY);
strcat(err_file, SR_ERROR_FILE_NAME);
} else {
err_file = (char*)malloc(strlen(CONFIG_DIRECTORY) + strlen(DEFAULT_ERROR_FILE_NAME) + 1);
+ if (NULL == err_file) {
+ SLOG(LOG_WARN, get_tag(), "[WARNING] Fail to get error file name");
+ return -1;
+ }
strcpy(err_file, CONFIG_DIRECTORY);
strcat(err_file, DEFAULT_ERROR_FILE_NAME);
}
err_fp = fopen(err_file, "w+");
if (NULL == err_fp) {
SLOG(LOG_WARN, get_tag(), "[WARNING] Fail to open error file (%s)", err_file);
+ free(err_file);
return -1;
}
SLOG(LOG_DEBUG, get_tag(), "Save Error File (%s)", err_file);
/* get data */
ttsd_data_save_error_log(uid, err_fp);
+ free(err_file);
+
fclose(err_fp);
return 0;
fprintf(fp, "---------------------");
return 0;
+}
+
+int ttsd_data_get_same_pid_client_count(int pid)
+{
+ int vsize = g_app_list.size();
+ int number = 0;
+
+ for (int i=0; i<vsize; i++) {
+ if(g_app_list[i].pid == pid) {
+ number++;
+ }
+ }
+
+ return number;
}
\ No newline at end of file
int ttsd_data_is_current_playing();
+int ttsd_data_get_same_pid_client_count(int pid);
+
int ttsd_setting_data_add(int pid);
int ttsd_setting_data_is_setting(int pid);
+
/* for error log */
int ttsd_data_save_error_log(int uid, FILE* fp);
+
#ifdef __cplusplus
}
#endif
int ttsdc_send_hello(int pid, int uid)
{
+ if (NULL == g_conn) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] Dbus connection is not available" );
+ return -1;
+ }
+
char service_name[64];
memset(service_name, 0, 64);
snprintf(service_name, 64, "%s%d", TTS_CLIENT_SERVICE_NAME, pid);
}
int ttsdc_send_message(int pid, int uid, int data, char *method)
-{
+{
+#if 0
+ if (NULL == g_conn) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] Dbus connection is not available" );
+ return -1;
+ }
+
char service_name[64];
memset(service_name, 0, 64);
snprintf(service_name, 64, "%s%d", TTS_CLIENT_SERVICE_NAME, pid);
}
dbus_message_unref(msg);
+#endif
+ char send_filename[64];
+ memset(send_filename, 0, 64);
+ snprintf(send_filename, 64, "/%s_%d", MESSAGE_FILE_PATH, pid);
+
+ FILE* fp;
+ fp = fopen(send_filename, "a+");
+ if (NULL == fp) {
+ SLOG(LOG_ERROR, get_tag(), "[File message ERROR] Fail to open message file");
+ return -1;
+ }
+ SLOG(LOG_DEBUG, get_tag(), "[File message] Write send file - %s, uid=%d, send_data=%d", method, uid, data);
+
+ fprintf(fp, "%s %d %d\n", method, uid, data);
+
+ fclose(fp);
+
return 0;
}
int ttsdc_send_error_message(int pid, int uid, int uttid, int reason)
{
+ if (NULL == g_conn) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] Dbus connection is not available" );
+ return -1;
+ }
+
char service_name[64];
memset(service_name, 0, 64);
snprintf(service_name, 64, "%s%d", TTS_CLIENT_SERVICE_NAME, pid);
return 0;
}
+#if 0
+int ttsd_send_start_next_synthesis()
+{
+ if (NULL == g_conn) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] Dbus connection is not available" );
+ return -1;
+ }
+
+ DBusMessage* msg;
+
+ msg = dbus_message_new_signal(
+ g_service_object, /* object name of the signal */
+ g_service_interface, /* interface name of the signal */
+ TTSD_SIGNAL_NEXT_SYNTHESIS); /* name of the signal */
+
+ if (NULL == msg) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] >>>> Fail to make message for 'start next synthesis'");
+ return -1;
+ }
+
+ if (!dbus_connection_send(g_conn, msg, NULL)) {
+ SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] >>>> Fail to send message for 'start next synthesis'");
+ return -1;
+ }
+
+ SLOG(LOG_DEBUG, get_tag(), "[Dbus] >>>> Send message for 'start next synthesis'");
+
+ dbus_connection_flush(g_conn);
+ dbus_message_unref(msg);
+
+ return 0;
+}
+#endif
static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handler)
{
else if (dbus_message_is_method_call(msg, g_service_interface, TTS_METHOD_PAUSE))
ttsd_dbus_server_pause(conn, msg);
-
+#if 0
/* daemon internal event*/
else if (dbus_message_is_signal(msg, g_service_interface, TTSD_SIGNAL_NEXT_SYNTHESIS))
ttsd_dbus_server_start_next_synthesis();
+#endif
/* setting event */
else if (dbus_message_is_method_call(msg, g_service_interface, TTS_SETTING_METHOD_HELLO))
return 0;
}
-int ttsd_send_start_next_synthesis()
+int ttsd_file_msg_open_connection(int pid)
{
- DBusMessage* msg;
-
- msg = dbus_message_new_signal(
- g_service_object, /* object name of the signal */
- g_service_interface, /* interface name of the signal */
- TTSD_SIGNAL_NEXT_SYNTHESIS); /* name of the signal */
-
- if (NULL == msg) {
- SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] >>>> Fail to make message for 'start next synthesis'");
+ /* Make file for Inotify */
+ char send_filename[64];
+ memset(send_filename, 0, 64);
+ snprintf(send_filename, 64, "%s_%d", MESSAGE_FILE_PATH, pid);
+
+ FILE* fp;
+ fp = fopen(send_filename, "a+");
+ if (NULL == fp) {
+ SLOG(LOG_ERROR, get_tag(), "[File message ERROR] Fail to make message file");
return -1;
}
+ SLOG(LOG_DEBUG, get_tag(), "[File message] Make message file");
+ fclose(fp);
+ return 0;
+}
- if (!dbus_connection_send(g_conn, msg, NULL)) {
- SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] >>>> Fail to send message for 'start next synthesis'");
- return -1;
+int ttsd_file_msg_close_connection(int pid)
+{
+ /* delete inotify file */
+ char path[64];
+ memset(path, 0, 64);
+ snprintf(path, 64, "%s_%d", MESSAGE_FILE_PATH, pid);
+ if (0 == access(path, R_OK)) {
+ if (0 != remove(path)) {
+ SLOG(LOG_WARN, get_tag(), "[File message WARN] Fail to remove message file");
+ }
}
-
- dbus_connection_flush(g_conn);
- dbus_message_unref(msg);
-
+ SLOG(LOG_DEBUG, get_tag(), "[File message] Delete message file");
return 0;
}
int ttsd_dbus_close_connection();
+int ttsd_file_msg_open_connection(int pid);
+
+int ttsd_file_msg_close_connection(int pid);
int ttsdc_send_hello(int pid, int uid);
int ttsdc_send_set_state_message(int pid, int uid, int state);
+#if 0
int ttsd_send_start_next_synthesis();
+#endif
#ifdef __cplusplus
}
} else {
SLOG(LOG_DEBUG, get_tag(), "[IN] tts finalize : uid(%d) \n", uid);
+
ret = ttsd_server_finalize(uid);
}
return 0;
}
+#if 0
/*
* Dbus Server functions for tts daemon internal
*/
{
return ttsd_server_start_next_synthesis();
}
+#endif
/*
* Dbus Setting-Daemon Server
int ttsd_dbus_server_pause(DBusConnection* conn, DBusMessage* msg);
+#if 0
/*
* Dbus Server functions for tts daemon internal
*/
int ttsd_dbus_server_start_next_synthesis();
+#endif
/*
* Dbus Server functions for Setting
g_cur_engine.default_lang, g_cur_engine.default_vctype);
} else {
SLOG(LOG_ERROR, get_tag(), "[Engine Agent ERROR] fail to write default voice to config (%d)", ret);
+ return TTSD_ERROR_OPERATION_FAILED;
}
+
+ return 0;
}
/******************************************************************************************
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize tts-daemon-noti");
return EXIT_FAILURE;
}
-
+
if (0 != ttsd_dbus_open_connection()) {
printf("Fail to initialize IPC connection \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to open dbus connection");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize tts-daemon-sr");
return EXIT_FAILURE;
}
-
+
if (0 != ttsd_dbus_open_connection()) {
printf("Fail to initialize IPC connection \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to open dbus connection");
player_s* __player_get_item(int uid);
-int __save_file(const int uid, const int index, const sound_data_s data, char** filename);
+int __save_file(int uid, int index, sound_data_s data, char** filename);
int __set_and_start(player_s* player);
return 0;
}
-int ttsd_player_create_instance(const int uid)
+int ttsd_player_create_instance(int uid)
{
if (false == g_player_init) {
SLOG(LOG_ERROR, get_tag(), "[Player ERROR] Not Initialized" );
return 0;
}
-
int ttsd_player_destroy_instance(int uid)
{
if (false == g_player_init) {
return 0;
}
-int ttsd_player_play(const int uid)
+int ttsd_player_play(int uid)
{
SLOG(LOG_DEBUG, get_tag(), "[Player] start play : uid(%d)", uid );
}
-int ttsd_player_stop(const int uid)
+int ttsd_player_stop(int uid)
{
SLOG(LOG_DEBUG, get_tag(), "[Player] stop player : uid(%d)", uid );
return 0;
}
-int ttsd_player_pause(const int uid)
+int ttsd_player_pause(int uid)
{
SLOG(LOG_DEBUG, get_tag(), "[Player] pause player : uid(%d)", uid );
return 0;
}
-int ttsd_player_resume(const int uid)
+int ttsd_player_resume(int uid)
{
SLOG(LOG_DEBUG, get_tag(), "[Player] Resume player : uid(%d)", uid );
return 0;
}
+int ttsd_player_get_state(int uid, ttsd_player_state_e* state)
+{
+ if (false == g_player_init) {
+ SLOG(LOG_ERROR, get_tag(), "[Player ERROR] Not Initialized" );
+ return -1;
+ }
+
+ player_s* current;
+ current = __player_get_item(uid);
+ if (NULL == current) {
+ SLOG(LOG_ERROR, get_tag(), "[Player ERROR] uid(%d) is not valid", uid);
+ return -1;
+ }
+
+ MMPlayerStateType player_state;
+ mm_player_get_state(current->player_handle, &player_state);
+
+ SLOG(LOG_DEBUG, get_tag(), "[PLAYER] State changed : state(%d)", player_state);
+
+ int ret = -1;
+ /* destroy player */
+ switch (player_state) {
+ case MM_PLAYER_STATE_PLAYING:
+ *state = TTSD_PLAYER_STATE_PLAYING;
+ break;
+ case MM_PLAYER_STATE_PAUSED:
+ *state = TTSD_PLAYER_STATE_PAUSED;
+ break;
+
+ case MM_PLAYER_STATE_NULL:
+ *state = TTSD_PLAYER_STATE_NULL;
+ break;
+
+ case MM_PLAYER_STATE_READY:
+ default:
+ SLOG(LOG_ERROR, get_tag(), "[Player ERROR] player state of uid(%d) is not valid", uid);
+ return -1;
+ break;
+ }
+
+ return 0;
+}
+
int ttsd_player_get_current_client()
{
if (false == g_player_init) {
return 0;
}
-int ttsd_player_get_current_utterance_id(const int uid)
+int ttsd_player_get_current_utterance_id(int uid)
{
SLOG(LOG_DEBUG, get_tag(), "[Player] get current utt id : uid(%d)", uid );
return NULL;
}
-int __save_file(const int uid, const int index, const sound_data_s data, char** filename)
+int __save_file(int uid, int index, sound_data_s data, char** filename)
{
char postfix[5];
memset(postfix, '\0', 5);
return -1;
}
- //if (TTSD_MODE_DEFAULT != ttsd_get_mode()) {
- // ret = mm_player_ignore_session(player->player_handle);
- // if (MM_ERROR_NONE != ret) {
- // SLOG(LOG_WARN, get_tag(), "[Player WARNING] fail mm_player_ignore_session() : %x", ret);
- // }
- //}
+ if (TTSD_MODE_DEFAULT != ttsd_get_mode()) {
+ ret = mm_player_ignore_session(player->player_handle);
+ if (MM_ERROR_NONE != ret) {
+ SLOG(LOG_WARN, get_tag(), "[Player WARNING] fail mm_player_ignore_session() : %x", ret);
+ }
+ }
/* realize and start mm player */
ret = mm_player_realize(player->player_handle);
PLAYER_ERROR
}player_event_e;
+typedef enum {
+ TTSD_PLAYER_STATE_NULL,
+ TTSD_PLAYER_STATE_PAUSED,
+ TTSD_PLAYER_STATE_PLAYING
+}ttsd_player_state_e;
+
typedef int (*player_result_callback_func)(player_event_e event, int uid, int utt_id);
/*
int ttsd_player_release(void);
-int ttsd_player_create_instance(const int uid);
+int ttsd_player_create_instance(int uid);
-int ttsd_player_destroy_instance(const int uid);
+int ttsd_player_destroy_instance(int uid);
-int ttsd_player_play(const int uid);
+int ttsd_player_play(int uid);
int ttsd_player_next_play(int uid);
-int ttsd_player_stop(const int uid);
+int ttsd_player_stop(int uid);
+
+int ttsd_player_pause(int uid);
-int ttsd_player_pause(const int uid);
+int ttsd_player_resume(int uid);
-int ttsd_player_resume(const int uid);
+int ttsd_player_get_state(int uid, ttsd_player_state_e* state);
int ttsd_player_get_current_client();
-int ttsd_player_get_current_utterance_id(const int uid);
+int ttsd_player_get_current_utterance_id(int uid);
int ttsd_player_all_stop();
#include "ttsd_config.h"
#include "ttsd_network.h"
+typedef enum {
+ TTSD_SYNTHESIS_CONTROL_DOING = 0,
+ TTSD_SYNTHESIS_CONTROL_DONE = 1,
+ TTSD_SYNTHESIS_CONTROL_EXPIRED = 2
+}ttsd_synthesis_control_e;
typedef struct {
int uid;
int uttid;
-} utterance_t;
+}utterance_t;
/* If current engine exist */
static bool g_is_engine;
/* If engine is running */
-static bool g_is_synthesizing;
+static ttsd_synthesis_control_e g_synth_control;
-/* If the daemon get the result */
-static bool g_is_next_synthesis = false;
+static Ecore_Timer* g_wait_timer = NULL;
/* Function definitions */
int __server_next_synthesis(int uid);
-int __server_set_is_synthesizing(bool flag)
+int __server_set_synth_control(ttsd_synthesis_control_e control)
{
- g_is_synthesizing = flag;
+ g_synth_control = control;
return 0;
}
-bool __server_get_is_synthesizing()
+ttsd_synthesis_control_e __server_get_synth_control()
{
- return g_is_synthesizing;
-}
-
-int __server_set_is_next_synthesis(bool flag)
-{
- g_is_next_synthesis = flag;
- return 0;
-}
-
-bool __server_get_is_next_synthesis()
-{
- return g_is_next_synthesis;
+ return g_synth_control;
}
int __server_send_error(int uid, int utt_id, int error_code)
return 0;
}
-int __server_start_synthesis(int uid, int mode)
+Eina_Bool __wait_synthesis(void *data)
{
- int result = 0;
-
- /* check if tts-engine is running */
- if (true == __server_get_is_synthesizing()) {
- SLOG(LOG_DEBUG, get_tag(), "[Server] TTS-engine is running ");
- } else {
- speak_data_s sdata;
- if (0 == ttsd_data_get_speak_data(uid, &sdata)) {
- utterance_t* utt = (utterance_t*)g_malloc0(sizeof(utterance_t));
-
- if (NULL == utt) {
- SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Out of memory : utterance ");
- return TTSD_ERROR_OUT_OF_MEMORY;
- }
-
- utt->uid = uid;
- utt->uttid = sdata.utt_id;
-
- SLOG(LOG_DEBUG, get_tag(), "-----------------------------------------------------------");
- SLOG(LOG_DEBUG, get_tag(), "ID : uid (%d), uttid(%d) ", utt->uid, utt->uttid );
- SLOG(LOG_DEBUG, get_tag(), "Voice : langauge(%s), type(%d), speed(%d)", sdata.lang, sdata.vctype, sdata.speed);
- SLOG(LOG_DEBUG, get_tag(), "Text : %s", sdata.text);
- SLOG(LOG_DEBUG, get_tag(), "-----------------------------------------------------------");
-
- __server_set_is_synthesizing(true);
- int ret = 0;
- ret = ttsd_engine_start_synthesis(sdata.lang, sdata.vctype, sdata.text, sdata.speed, (void*)utt);
- if (0 != ret) {
- SLOG(LOG_ERROR, get_tag(), "[Server ERROR][%s] * FAIL to start SYNTHESIS !!!! * ", __FUNCTION__);
-
- __server_set_is_synthesizing(false);
-
- result = TTSD_ERROR_OPERATION_FAILED;
-
- g_free(utt);
-
- /* mode 2 : Add text in playing state */
- if (2 == mode) {
- __server_send_error(uid, sdata.utt_id, TTSD_ERROR_OPERATION_FAILED);
- ttsd_config_save_error(utt->uid, utt->uttid, sdata.lang, sdata.vctype, sdata.text, __FUNCTION__, __LINE__, "fail to start synthesis (mode=2)");
-
- ttsd_server_stop(uid);
-
- int pid = ttsd_data_get_pid(uid);
- ttsdc_send_set_state_message(pid, uid, APP_STATE_READY);
- }
- } else {
- SLOG(LOG_DEBUG, get_tag(), "[Server] SUCCESS to start synthesis");
- }
-
- if(sdata.text != NULL)
- g_free(sdata.text);
+ /* get current play */
+ int uid = ttsd_data_is_current_playing();
+ if (uid > 0) {
+ if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
+ return EINA_TRUE;
} else {
- SLOG(LOG_DEBUG, get_tag(), "[Server] Text List is EMPTY!! ");
- }
- }
-
- return result;
-}
-
-int __server_play_internal(int uid, app_state_e state)
-{
- /* precondition */
- /* - uid is valid */
- /* - input uid is current play */
-
- int ret = 0;
-
- if (APP_STATE_PAUSED == state) {
- SLOG(LOG_DEBUG, get_tag(), "[Server] uid(%d) is 'Pause' state : Next step is resume player and start synthesis ", uid);
-
- /* resume player and start speech synthesis */
- if (0 != ttsd_player_resume(uid)) {
- SLOG(LOG_WARN, get_tag(), "[Server WARNING] fail to ttsd_player_resume()");
- }
-
- /* mode 1 for play */
- ret = __server_start_synthesis(uid, 1);
-
- } else if(APP_STATE_READY == state) {
- SLOG(LOG_DEBUG, get_tag(), "[Server] uid(%d) is 'Ready' state : Next step is start synthesis ", uid);
-
- /* mode 1 for play */
- ret = __server_start_synthesis(uid, 1);
+ g_wait_timer = NULL;
+ if (TTSD_SYNTHESIS_CONTROL_DONE == __server_get_synth_control()) {
+ /* Start next synthesis */
+ __server_next_synthesis(uid);
+ }
+ }
} else {
- /* NO this case */
+ g_wait_timer = NULL;
}
- return ret;
+ return EINA_FALSE;
}
-int __server_next_synthesis(int uid)
+int __synthesis(int uid)
{
- SLOG(LOG_DEBUG, get_tag(), "===== NEXT SYNTHESIS & PLAY START");
-
- /* get current playing client */
- int current_uid = ttsd_data_get_current_playing();
-
- if (0 > current_uid) {
- SLOG(LOG_WARN, get_tag(), "[Server WARNING] Current uid is not valid");
- SLOG(LOG_DEBUG, get_tag(), "=====");
- SLOG(LOG_DEBUG, get_tag(), " ");
- return 0;
- }
-
- if (true == __server_get_is_synthesizing()) {
- SLOG(LOG_WARN, get_tag(), "[Server WARNING] Engine has already been running. ");
- SLOG(LOG_DEBUG, get_tag(), "=====");
- SLOG(LOG_DEBUG, get_tag(), " ");
- return 0;
- }
-
- /* synthesize next text */
speak_data_s sdata;
- if (0 == ttsd_data_get_speak_data(current_uid, &sdata)) {
+ if (0 == ttsd_data_get_speak_data(uid, &sdata)) {
utterance_t* utt = (utterance_t*)g_malloc0(sizeof(utterance_t));
return TTSD_ERROR_OUT_OF_MEMORY;
}
- utt->uid = current_uid;
+ utt->uid = uid;
utt->uttid = sdata.utt_id;
SLOG(LOG_DEBUG, get_tag(), "-----------------------------------------------------------");
SLOG(LOG_DEBUG, get_tag(), "Text : %s", sdata.text);
SLOG(LOG_DEBUG, get_tag(), "-----------------------------------------------------------");
- __server_set_is_synthesizing(true);
-
int ret = 0;
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_DOING);
ret = ttsd_engine_start_synthesis(sdata.lang, sdata.vctype, sdata.text, sdata.speed, (void*)utt);
if (0 != ret) {
SLOG(LOG_ERROR, get_tag(), "[Server ERROR][%s] * FAIL to start SYNTHESIS !!!! * ", __FUNCTION__);
- __server_set_is_synthesizing(false);
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_DONE);
- __server_send_error(current_uid, sdata.utt_id, TTSD_ERROR_OPERATION_FAILED);
ttsd_config_save_error(utt->uid, utt->uttid, sdata.lang, sdata.vctype, sdata.text, __FUNCTION__, __LINE__, "fail to start synthesis");
g_free(utt);
- ttsd_server_stop(current_uid);
+ ttsd_server_stop(uid);
- int pid = ttsd_data_get_pid(current_uid);
- ttsdc_send_set_state_message(pid, current_uid, APP_STATE_READY);
+ int pid = ttsd_data_get_pid(uid);
+ ttsdc_send_set_state_message(pid, uid, APP_STATE_READY);
+ } else {
+ g_wait_timer = ecore_timer_add(0, __wait_synthesis, NULL);
}
if(sdata.text != NULL)
SLOG(LOG_DEBUG, get_tag(), "[Server] --------------------");
}
+ return 0;
+}
+
+int __server_next_synthesis(int uid)
+{
+ SLOG(LOG_DEBUG, get_tag(), "===== NEXT SYNTHESIS & PLAY START");
+
+ /* get current playing client */
+ int current_uid = ttsd_data_get_current_playing();
+
+ if (0 > current_uid) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Current uid is not valid");
+ SLOG(LOG_DEBUG, get_tag(), "=====");
+ SLOG(LOG_DEBUG, get_tag(), " ");
+ return 0;
+ }
+
+ if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Engine has already been running. ");
+ SLOG(LOG_DEBUG, get_tag(), "=====");
+ SLOG(LOG_DEBUG, get_tag(), " ");
+ return 0;
+ }
+
+ __synthesis(current_uid);
+
if (0 != ttsd_player_play(current_uid)) {
- SLOG(LOG_WARN, get_tag(), "[Server WARNING] __server_next_synthesis : fail ttsd_player_play() ");
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Fail ttsd_player_play() ");
} else {
/* success playing */
SLOG(LOG_DEBUG, get_tag(), "[Server] Success to start player");
SLOG(LOG_ERROR, get_tag(), "[SERVER ERROR][%s] player result error", __FUNCTION__);
__server_send_error(uid, utt_id, TTSD_ERROR_OPERATION_FAILED);
ttsd_config_save_error(uid, utt_id, NULL, -1, NULL, __FUNCTION__, __LINE__, "PLAYER_ERROR");
- // break;
case PLAYER_EMPTY_SOUND_QUEUE:
/* check whether synthesis is running */
- if (false == __server_get_is_synthesizing()) {
+ if (TTSD_SYNTHESIS_CONTROL_DONE == __server_get_synth_control()) {
/* check text queue is empty */
if (0 == ttsd_data_get_speak_data_size(uid) && 0 == ttsd_data_get_sound_data_size(uid)) {
SLOG(LOG_DEBUG, get_tag(), "[SERVER Callback] all play completed ");
}
if (event == TTSP_RESULT_EVENT_FINISH) {
- __server_set_is_synthesizing(false);
- __server_set_is_next_synthesis(true);
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_DONE);
}
} else if (event == TTSP_RESULT_EVENT_CANCEL) {
SLOG(LOG_DEBUG, get_tag(), "[SERVER] Event : TTSP_RESULT_EVENT_CANCEL");
- __server_set_is_synthesizing(false);
- __server_set_is_next_synthesis(true);
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_EXPIRED);
} else {
- SLOG(LOG_DEBUG, get_tag(), "[SERVER] Event ERROR");
- __server_set_is_synthesizing(false);
- __server_set_is_next_synthesis(true);
+ SLOG(LOG_DEBUG, get_tag(), "[SERVER] Event : TTSP_RESULT_EVENT_ERROR");
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_EXPIRED);
}
if (TTSP_RESULT_EVENT_FINISH == event || TTSP_RESULT_EVENT_CANCEL == event || TTSP_RESULT_EVENT_FAIL == event) {
SLOG(LOG_DEBUG, get_tag(), "===== SYNTHESIS RESULT CALLBACK END");
SLOG(LOG_DEBUG, get_tag(), " ");
+#if 0
if (true == __server_get_is_next_synthesis()) {
__server_set_is_next_synthesis(false);
/* need to send dbus message event */
ttsd_send_start_next_synthesis();
}
+#endif
return 0;
}
int ret = -1;
if (true == ttsd_engine_select_valid_voice(language, type, &out_lang, &out_type)) {
- SLOG(LOG_ERROR, get_tag(), "[Server] vaild language : lang(%s), type(%d)", out_lang, out_type);
+ SLOG(LOG_ERROR, get_tag(), "[Server] valid language : lang(%s), type(%d)", out_lang, out_type);
ret = ttsd_engine_setting_set_default_voice(out_lang, out_type);
if (0 != ret)
SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to set vaild language : lang(%s), type(%d)", out_lang, out_type);
if (true == ttsd_engine_select_valid_voice("en_US", type, &out_lang, &out_type)) {
ret = ttsd_engine_setting_set_default_voice(out_lang, out_type);
if (0 != ret)
- SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to set vaild language : lang(%s), type(%d)", out_lang, out_type);
+ SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to set valid language : lang(%s), type(%d)", out_lang, out_type);
if (NULL == out_lang)
free(out_lang);
/*
-* Daemon init
+* Server APIs
*/
int ttsd_initialize()
} else
g_is_engine = true;
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_EXPIRED);
+
return TTSD_ERROR_NONE;
}
SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to load current engine ");
return TTSD_ERROR_OPERATION_FAILED;
}
-
/* Check system language */
ttsd_config_update_language();
}
+ if (0 == ttsd_data_get_same_pid_client_count(pid)) {
+ SLOG(LOG_DEBUG, get_tag(), "[Server] open file msg connection");
+ if (0 != ttsd_file_msg_open_connection(pid)) {
+ SLOG(LOG_ERROR, get_tag(), "[Server ERROR] fail to open file message connection");
+ return TTSD_ERROR_OPERATION_FAILED;
+ }
+ }
+
if (0 != ttsd_data_new_client(pid, uid)) {
SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to add client info ");
return TTSD_ERROR_OPERATION_FAILED;
ttsd_player_destroy_instance(uid);
+ int pid = ttsd_data_get_pid(uid);
+
ttsd_data_delete_client(uid);
+ if (0 == ttsd_data_get_same_pid_client_count(pid)) {
+ SLOG(LOG_DEBUG, get_tag(), "[Sever] File msg close connection");
+ ttsd_file_msg_close_connection(pid);
+ }
+
/* unload engine, if ref count of client is 0 */
if (0 == ttsd_data_get_client_count()) {
ecore_timer_add(0, __quit_ecore_loop, NULL);
}
}
- /* mode 2 for add text */
- if (0 != __server_start_synthesis(uid, 2)) {
- SLOG(LOG_ERROR, get_tag(), "[Server ERROR] fail to schedule synthesis : uid(%d)", uid);
- return TTSD_ERROR_OPERATION_FAILED;
+ /* Check whether tts-engine is running or not */
+ if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Engine has already been running.");
+ } else {
+ __synthesis(uid);
}
}
return TTSD_ERROR_OPERATION_FAILED;
}
- if (0 != __server_play_internal(uid, state)) {
- SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to start synthesis : uid(%d)", uid);
- return TTSD_ERROR_OPERATION_FAILED;
+ if (APP_STATE_PAUSED == state) {
+ SLOG(LOG_DEBUG, get_tag(), "[Server] uid(%d) is 'Pause' state : Next step is resume player and start synthesis ", uid);
+
+ ttsd_player_state_e state;
+ if (0 != ttsd_player_get_state(uid, &state)) {
+ SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to get player state : uid(%d)", uid);
+ return TTSD_ERROR_OPERATION_FAILED;
+ }
+
+ if (TTSD_PLAYER_STATE_PAUSED == state) {
+ /* Resume player */
+ if (0 != ttsd_player_resume(uid)) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] fail to ttsd_player_resume()");
+ }
+ } else if (TTSD_PLAYER_STATE_NULL == state) {
+ if (0 != ttsd_player_play(uid)) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Fail ttsd_player_play() ");
+
+ /* Need to wait synthesis */
+ if (NULL == g_wait_timer)
+ g_wait_timer = ecore_timer_add(0, __wait_synthesis, NULL);
+ } else {
+ /* success playing */
+ SLOG(LOG_DEBUG, get_tag(), "[Server] Success to start player");
+ }
+ } else {
+ /* error */
+ }
+ }
+
+ /* Check whether tts-engine is running or not */
+ if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
+ SLOG(LOG_WARN, get_tag(), "[Server WARNING] Engine has already been running.");
+ } else {
+ __synthesis(uid);
}
return TTSD_ERROR_NONE;
if (0 != ttsd_player_stop(uid))
SLOG(LOG_WARN, get_tag(), "[Server] Fail to ttsd_player_stop()");
- if (true == __server_get_is_synthesizing()) {
+ if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
SLOG(LOG_DEBUG, get_tag(), "[Server] TTS-engine is running ");
int ret = 0;
ret = ttsd_engine_cancel_synthesis();
if (0 != ret)
SLOG(LOG_ERROR, get_tag(), "[Server ERROR] Fail to cancel synthesis : ret(%d)", ret);
+ }
- __server_set_is_synthesizing(false);
- }
+ if (NULL != g_wait_timer) {
+ SLOG(LOG_DEBUG, get_tag(), "Wait timer is deleted");
+ ecore_timer_del(g_wait_timer);
+ }
+
+ __server_set_synth_control(TTSD_SYNTHESIS_CONTROL_EXPIRED);
} else {
SLOG(LOG_WARN, get_tag(), "[Server WARNING] Current state is 'ready' ");
}
return TTSD_ERROR_NONE;
}
+#if 0
/*
* Server API for Internal event
*/
-
int ttsd_server_start_next_synthesis()
{
/* get current play */
return __server_next_synthesis(uid);
}
+#endif
/*
* TTS Server Functions for Setting *
#endif
/**
-* Daemon init
+* Server APIs
*/
-
-/** Daemon initialize */
int ttsd_initialize();
int ttsd_finalize();
int ttsd_server_pause(int uid, int* utt_id);
+#if 0
/*
* Server API for internal event
*/
int ttsd_server_start_next_synthesis();
+#endif
/*
* Server API for setting
-tts-server system::app_logging wx
+tts-server device::app_logging wx
tts-server tts-engine-samsung::vdata rx
tts-server system::vconf rwxat
tts-server sound_server rw