Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Text-to-Speech

  1. #1
    Join Date
    Jun 2008
    Beans
    27

    Text-to-Speech

    Is there a text-to-speech software for Ubuntu 8.04? I'm using OSS 4 1016 and Gnome. Tankan.

  2. #2
    Join Date
    Jun 2008
    Beans
    27

    Re: Text-to-Speech

    Anyone?

  3. #3
    Join Date
    Dec 2006
    Beans
    1,133
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Text-to-Speech

    I believe espeak is installed by default in 8.04, if not it is in the repositories. The festival speech synthesizer was default with earlier versions of ubuntu and is available in the repos. as well.

    Just try

    espeak "hello"

    from a terminal to see if it's installed, then man espeak for more info.
    There are no dumb questions, just dumb answers.

  4. #4
    Join Date
    Jan 2007
    Location
    Belo Horizonte, Brazil
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Text-to-Speech

    espeak is a really great software, and easier to use than festival or mbrola... I use it with lame to convert my ebooks to mp3, so i can hear them as audiobooks on the school bus...

    Here is a small script I made to make the process easier:

    Code:
    #!/bin/sh
    # txt2mp3 - convert text files to mp3 audio files (aka audiobooks)
    # v0.1
    #
    # (c) 2008 Everthon Valadão <everthonvaladao@gmail.com> under the GPL
    #          http://www.gnu.org/copyleft/gpl.html
    #
    # OBS.: install some pre-requisites first, with
    #       sudo apt-get install espeak lame xpdf-utils odt2txt antiword
    
    TXT_FILE="$1"
    BASENAME=`echo "$TXT_FILE" | sed 's/\(.*\)\(\....$\)/\1/g'`
    
    echo "TTS (text-to-speach) ${TXT_FILE}"
    
    ext=${1##*.}
    
    # if it isn't a TXT file, convert it first
    if [ "$ext" != "txt" ] ; then
        TMP_FILE="/tmp/espeakfile-$$.txt"
    
        # PDF
        if [ "$ext" = "pdf" ] ; then
            echo "converting from PDF to TXT"
            pdftotext "${TXT_FILE}" "${TMP_FILE}"
        fi
    
        # ODT
        if [ "$ext" = "odt" ] ; then
            echo "converting from ODT to TXT"
            odt2txt --subst=all "${TXT_FILE}" > "${TMP_FILE}"
        fi
    
        # DOC
        if [ "$ext" = "doc" ] ; then
            echo "converting from DOC to TXT"
            antiword "${TXT_FILE}" > "${TMP_FILE}"
        fi
    
        TXT_FILE="${TMP_FILE}"
    fi
    
    rm -f /tmp/voice.wav
    
    # create a FIFO "named pipe" to save space
    mkfifo /tmp/voice.wav
    
    # espeak write output to a pipe while lame encodes the file on the fly
    nice espeak -f "${TXT_FILE}" -w /tmp/voice.wav & \
    xterm -e nice lame -a --resample 16 -V 9 --vbr-new --lowpass 8 -f /tmp/voice.wav -o "${BASENAME}_VBR.mp3"
    
    echo "...done! Voice saved as ${1}.mp3"
    source: txt2mp3 - Como converter eBooks pra audioBooks

    P.S.: epseak supports a lot of languages other than english, as you can check with `espeak --voices`

    P.S.2: se você fala português como eu, pode adicionar um argumento ao espeak para utilizar uma voz na nossa língua pátria:
    Code:
    nice espeak -v brazil+f3 -p 25 -f "${TXT_FILE}" -w /tmp/voice.wav & \
    no início é um pouco esquisito, mas com pouco tempo você se acostuma e passa a entender tudo ^^
    Last edited by everthonvaladao; August 27th, 2008 at 06:25 PM.

  5. #5
    Join Date
    Mar 2008
    Beans
    349
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Text-to-Speech

    Fyi, the program "pdftotext" doesn't have its own package, it's in the package xpdf-utils.

  6. #6
    Join Date
    Jan 2007
    Location
    Belo Horizonte, Brazil
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Text-to-Speech

    Quote Originally Posted by RequinB4 View Post
    Fyi, the program "pdftotext" doesn't have its own package, it's in the package xpdf-utils.
    @RequinB4: you're rigth, thanks! (i've updated my post)

  7. #7
    Join Date
    Mar 2008
    Beans
    349
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Text-to-Speech

    Fyi, to anyone who cares, I've changed the pdf section of that script to instaed of using pdftotext use this: http://ubuntuforums.org/showthread.php?t=882899

    Takes longer, but decreases the need for the user to check if there is embedded text in the pdf file (if there is, it should work fine anyway)
    Last edited by RequinB4; August 28th, 2008 at 03:40 AM.

  8. #8
    Join Date
    Oct 2007
    Location
    wrong planet
    Beans
    746
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Text-to-Speech

    Anybody have ebooks in chm that they convert to text?
    Linux Advanced Guides and News!
    http://linuxinnovations.blogspot.com/

    Green means go, Yellow means faster, Red means don't stop.

  9. #9
    Join Date
    Sep 2006
    Beans
    3,165
    Distro
    Ubuntu Karmic Koala (testing)

    Re: Text-to-Speech

    You should try festival with high quality sounds.There is a howto at tutorials section

  10. #10
    Join Date
    Jan 2007
    Location
    Belo Horizonte, Brazil
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Text-to-Speech

    I tried festival and mbrola, but they are too much complicated to get work with brazilian portuguese... (and yes, i followed the tutorial)

Page 1 of 2 12 LastLast

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
  •