g_free(my_macro_buffer); \
}
+#define _voice_synth_path "/usr/bin/flite"
+
#endif /* ifndef MAEMO_MAPPER_DEFINES */
hildon_play_system_sound(
"/usr/share/sounds/ui-information_note.wav");
sleep(1);
-# define _voice_synth_path "/usr/bin/flite"
printf("%s %s\n", _voice_synth_path,
_last_spoken_phrase);
- execl("/bin/sh", _voice_synth_path, _voice_synth_path,
+ execl(_voice_synth_path, basename(_voice_synth_path),
"-t", _last_spoken_phrase, (char *)NULL);
+ /* No good? Try to launch it with /bin/sh */
+ execl("/bin/sh", "sh", "-c", _voice_synth_path,
+ "-t", _last_spoken_phrase, (char *)NULL);
+ /* Still no good? Oh well... */
exit(0);
}
}
else
_enable_voice = TRUE;
+ if(_enable_voice)
+ {
+ /* Make sure we actually have voice capabilities. */
+ GnomeVFSFileInfo file_info;
+ _enable_voice = ((GNOME_VFS_OK == gnome_vfs_get_file_info(
+ _voice_synth_path, &file_info,
+ GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS))
+ && (file_info.permissions & GNOME_VFS_PERM_ACCESS_EXECUTABLE));
+ }
+
/* Get Fullscreen flag. Default is FALSE. */
_fullscreen = gconf_client_get_bool(gconf_client,
GCONF_KEY_FULLSCREEN, NULL);