From: Kaj-Michael Lang Date: Wed, 25 Jul 2007 08:06:07 +0000 (+0300) Subject: Enable calling of flite on non-hildon too. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aa8187600b61ceb423014ffb6b57f5cf136f1cc;p=mapper Enable calling of flite on non-hildon too. Fix the variable used. For now, just beep on plain gtk --- 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