This small patch adds support for the Festival speech synthesizer to Mail Notification 3.0, http://www.nongnu.org/mailnotify/. Whenever is detects new mail, the origin and the subject of the message will be uttered as follows:
patch -p0 < mail-notification-3.0-festival.diffYou can then compile and install Mail Notification as described in the INSTALL file. In addition to Mail Notification's requirements, Festival needs to be installed and running. It is usually included in most Linux distributions or available in precompiled packages, but if it is not your case, it can be downloaded and installed manually:
The Festival server might not accept connections from localhost. If this is the case, replace the line
(defvar server_access_list '(localhost)with
(defvar server_access_list '("127.0.0.1" "localhost" "localhost\\.localdomain")in the festival.scm file (/usr/share/festival/festival.scm under Fedora).
The best sounding voice in my opinion is "cmu_us_slt_arctic_hts". To set it as default, instead of 'kal_diphone', place it first in the list starting with
(defvar default-voice-priority-listin the voices.scm file (/usr/share/festival/festival.scm under Fedora).
Festival uses the old /dev/dsp OSS interface. In order to share the sound card, start it with aoss, esddsp, or artsdsp, depending on which tool you are using to share your sound card:
aoss festival --server esddsp festival --server artsdsp festival --serverGNOME Speech
Why not use GNOME Speech? Well, I did try to use GNOME Speech, and the API worked quite well within Mail Notification, but unfortunately, there are two major issues that made it less interesting to use: