From 0aa8187600b61ceb423014ffb6b57f5cf136f1cc Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 25 Jul 2007 11:06:07 +0300 Subject: [PATCH] Enable calling of flite on non-hildon too. Fix the variable used. For now, just beep on plain gtk --- src/utils.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/utils.c b/src/utils.c index 43574cf..229e19b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -27,29 +27,29 @@ void sound_noise(void) { #ifdef WITH_HILDON - hildon_play_system_sound("/usr/share/sounds/ui-information_note.wav"); +hildon_play_system_sound("/usr/share/sounds/ui-information_note.wav"); #else - +gdk_beep(); #endif } void sound_speak(gchar * phrase) { +#ifdef WITH_ESPEAK +#define _voice_synth_path "/usr/bin/espeak" +#else #define _voice_synth_path "/usr/bin/flite" +#endif -#if WITH_HILDON - if (!fork()) { - /* We are the fork child. Synthesize the voice. */ - sound_noise(); - sleep(1); - printf("%s %s\n", _voice_synth_path, _last_spoken_phrase); - execl(_voice_synth_path, _voice_synth_path, - "-t", _last_spoken_phrase, (char *)NULL); - exit(0); - } -#else +if (!fork()) { + /* We are the fork child. Synthesize the voice. */ + sound_noise(); + sleep(1); + printf("%s %s\n", _voice_synth_path, phrase); + execl(_voice_synth_path, _voice_synth_path, "-t", phrase, (char *)NULL); + exit(0); +} -#endif } #if 0 -- 2.39.5