]> err.no Git - mapper/commitdiff
Enable calling of flite on non-hildon too.
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 08:06:07 +0000 (11:06 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 08:06:07 +0000 (11:06 +0300)
Fix the variable used.
For now, just beep on plain gtk

src/utils.c

index 43574cf65eb3b41051c157b087e67c1aa5199f31..229e19b5dd52ce53d1c0d63bf8ab33b3d1ccea4b 100644 (file)
 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