Festival is great, although the default voice leaves something to be desired, in my opinion. I followed this tutorial to find a better-sounding voice (nitech_us_slt_arctic_hts was my favorite).
As for a GUI, festival itself does not have a GUI, but I wrote a couple of simple nautilus scripts that I use to read text files.
These go in ~/.gnome2/nautilus-scripts:
Save the following file as "Read" in the aforementioned directory:
Code:
#!/usr/bin/perl -w
use strict;
my @files = split("\n", $ENV{NAUTILUS_SCRIPT_SELECTED_FILE_PATHS});
foreach my $file (@files)
{
if ( -e $file )
{
`festival --tts '$file'`;
}
}
If you have lame installed, you can have this script create MP3s from your text files. I called this one ReadToMP3:
Code:
#!/usr/bin/perl -w
use strict;
my @files = split("\n", $ENV{NAUTILUS_SCRIPT_SELECTED_FILE_PATHS});
foreach my $file (@files)
{
if ( -e $file )
{
my $wavName = $file.".tmp.wav";
my $mp3Name = $file.".mp3";
`cat '$file' | text2wave -o '$wavName'`;
if ( -e $wavName) {
`lame '$wavName' '$mp3Name'`;
unlink($wavName);
if (-e $mp3Name) {
`zenity --info --text="Converted $file to $mp3Name"`;
} else {
`zenity --info --text="Failed to convert $file to $mp3Name"`;
}
} else {
`zenity --info --text="Failed to convert $file to $wavName"`;
}
} else {
`zenity --info --text="$file could not be opened"`;
}
}
Like I said, after you've installed festival and lame just save those files in your .gnome2/nautilus-scripts directory. Now you can right-click on text files and choose the appropriate script from the "Scripts" submenu to have them read to you.
Good luck.
Bookmarks