20#define SPEECH_PROGRAM "say"
22#define SPEECH_PROGRAM "festival --tts -"
33 cm_msg(
MERROR,
"Speaker",
"No speech synthesizer attached");
58 fputs(
"Speech synthesizer not enabled - terminating\n",
stderr);
67 while (*
sp ==
' ' || *
sp ==
'\t')
123 else if (
argv[
i][0] ==
'-') {
126 if (
argv[
i][1] ==
'e')
128 else if (
argv[
i][1] ==
'h')
130 else if (
argv[
i][1] ==
'c')
132 else if (
argv[
i][1] ==
't')
134 else if (
argv[
i][1] ==
'u')
136 else if (
argv[
i][1] ==
's')
141 (
"usage: mlxspeaker [-h Hostname] [-e Experiment] [-c command] [-D] daemon\n");
142 printf(
" [-t mt_talk] Specify the mt_talk alert command\n");
143 printf(
" [-u mt_user] Specify the mt_user alert command\n");
144 printf(
" [-s shut up time] Specify the min time interval between alert [s]\n");
145 printf(
" The -t & -u switch require a command equivalent to:\n");
146 printf(
" '-t play --volume=0.3 file.wav'\n");
147 printf(
" [-c command] Used to start the speech synthesizer,\n");
148 printf(
" which should read text from it's standard input.\n");
149 printf(
" eg: mlxspeaker -c 'festival --tts -'\n\n");
156 printf(
"Becoming a daemon...\n");
166 cm_msg(
MERROR,
"Speaker",
"Unable to start \"%s\": %s\n",
196#if defined(SIGPIPE) && defined(SIG_IGN)
INT cm_yield(INT millisec)
INT cm_connect_experiment(const char *host_name, const char *exp_name, const char *client_name, void(*func)(char *))
INT cm_disconnect_experiment(void)
INT cm_get_environment(char *host_name, int host_name_size, char *exp_name, int exp_name_size)
INT ss_getchar(BOOL reset)
INT ss_daemon_init(BOOL keep_stdout)
INT ss_sleep(INT millisec)
INT ss_system(const char *command)
INT cm_msg_register(EVENT_HANDLER *func)
INT cm_msg(INT message_type, const char *filename, INT line, const char *routine, const char *format,...)
char exp_name[NAME_LENGTH]
char host_name[HOST_NAME_LENGTH]
#define message(type, str)
void sigpipehandler(int sig)
void receive_message(HNDLE hBuf, HNDLE id, EVENT_HEADER *header, void *message)
void siginthandler(int sig)
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)