Results 1 to 5 of 5

Thread: Text reader for linux

  1. #1
    Join Date
    Jul 2006
    Location
    UK
    Beans
    55
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question Text reader for linux

    Hello,

    I just wanted to know if anyone knows if there is anything like a text reader for linux?

    I used this LINK for windows before but it worked well.

    Thanks
    Alien

  2. #2
    Join Date
    Jun 2005
    Beans
    6,115

    Re: Text reader for linux

    There is festival, I think its in the repos
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  3. #3
    Join Date
    Jun 2008
    Location
    USA
    Beans
    169

    Re: Text reader for linux

    Oh like Text-to-Speech, yeah, I've heard festival is the best, like the above said, it should be in the package manager.

  4. #4
    Join Date
    Jul 2006
    Location
    UK
    Beans
    55
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question Re: Text reader for linux

    Quote Originally Posted by Predator106 View Post
    Oh like Text-to-Speech, yeah, I've heard festival is the best, like the above said, it should be in the package manager.
    Ok, i downloaded it,

    But im not to sure how to use it? Dose it actually have an interface? if i run it through terminal i get some random option to run a string. But when i do it gives an error?!

    Isnt there a way to open the UI if it has one?

    Thanks
    Alien

  5. #5

    Re: Text reader for linux

    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.
    Seth Grover
    e: sethdgrover [at] gmail [dot] com

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •