Results 1 to 8 of 8

Thread: Are there any simple ways to get natural sounding text-to-speech on Linux?

  1. #1
    Join Date
    Mar 2020
    Beans
    3

    Are there any simple ways to get natural sounding text-to-speech on Linux?

    I'm a releative newbie to Linux and Ubuntu with a visual impairment who really wants to make a full break from Windows, but can't because the text-to-speech options are just so awful.

    Over the years I've grown used to using a number of voices on Windows (from AT& T, ScanSoft, Microsoft and others) at speeds that most people find indecipherable, but I just can't find any native Linux ones that come anywhere close to them.

    Searching this site and others shows either quite old instructions for the ghastly espeak voices - or the slightly better Festival ones - or relatively complicated options of setting up WINE options.

    Setting these up on Windows was a doddle - can anyone point me to any help that might make it so on Linux?

    FYI - I don't need a full screen-reader, just the ability to select text and have it read back to me with a short-cut key.

    Any advice gratefully received.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,297
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    No.
    I found a relatively easy way to convert text to speech, but the resulting audio files are just too mechanical. It is a 100% native Linux solution, since I won't use WINE.

    Code:
    #!/bin/bash
    # Dependencies:
    #  sudo apt install libttspico-utils festival festvox-us-slt-hts
    #  sudo apt install ./festvox-us-slt-hts_0.2010.10.25-3_all.deb 
    #  sudo apt install libttspico-utils festival
    #  The .deb package is from the debian repos which should be compatible
    #     with Ubuntu 16.04.  Later Ubuntus have it in their repo.
    
    # Input file is from txt created from epub using calibre tool:
    #       ebook-convert input.epub output.txt
    
    ROOT=${1/%.txt/}
    
    # Provided as part of the Festival TTS engine
    text2wave "$1" -o "$ROOT.wav"
    ffmpeg -i "$ROOT.wav"  -codec:a libmp3lame -qscale:a 6 "$ROOT.mp3"
    rm "$ROOT.wav"
    Using X11 select-paste (left mouse to select; center mouse to paste), some thing like cat < | text2wave | mpv as an xdotool command might work. That's a bunch of stdin and stdout redirection. I didn't verify that text2wave or mpv support this redirection, but most shell commands do. I don't have a text2wave capable system up right now.

    Perhaps this will be sufficient for someone?
    Last edited by TheFu; 2 Weeks Ago at 01:20 PM.

  3. #3
    Join Date
    Mar 2020
    Beans
    50
    Distro
    Ubuntu 18.04 Bionic Beaver

    Lightbulb Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by adrian-dickenson View Post
    can anyone point me to any help that might make it so on Linux?
    have a look here : https://www.linuxlinks.com/speechtools/

    & here : https://blog.michaelamerz.com/wordpr...to-speech-tts/

    the 2nd link has some voice samples too for your convenience.

  4. #4
    Join Date
    Mar 2020
    Beans
    50
    Distro
    Ubuntu 18.04 Bionic Beaver

    Exclamation Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by TheFu View Post
    I found a relatively easy way to convert text to speech, but the resulting audio files are just too mechanical. It is a 100% native Linux solution, since I won't use WINE. Perhaps this will be sufficient for someone?
    OP has already tried espeak & festival & is looking for something better.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,297
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by ipv View Post
    OP has already tried espeak & festival & is looking for something better.
    Which is why the answer "no" was first.

    However, in the next few years, someone else will find this thread and might want to see for themselves. Figured I’d make it easier for anyone else because i happened to have worked through it recently. "No" for one person isn't necessarily no for everyone.

  6. #6
    Join Date
    Mar 2020
    Beans
    50
    Distro
    Ubuntu 18.04 Bionic Beaver

    Thumbs up Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by TheFu View Post
    However, in the next few years, someone else will find this thread and might want to see for themselves.
    +1 for the optimism.

  7. #7
    Join Date
    Mar 2020
    Beans
    3

    Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by ipv View Post
    have a look here : https://www.linuxlinks.com/speechtools/

    & here : https://blog.michaelamerz.com/wordpr...to-speech-tts/

    the 2nd link has some voice samples too for your convenience.

    Thanks - I'd come across those sites during my search and have approached a company recommended in the 2nd link (https://www.cepstral.com) although they require a request via a support ticket to find out if they will supply me with a stand-alone voice and at what price.

    The others are variations on the espeak / Festival options that I've already tried (although there are a few newer festival voices that might be an improvement over the ones I've tried).

    Thanks for the advice!

  8. #8
    Join Date
    Mar 2020
    Beans
    3

    Re: Are there any simple ways to get natural sounding text-to-speech on Linux?

    Quote Originally Posted by TheFu View Post
    No.
    I found a relatively easy way to convert text to speech, but the resulting audio files are just too mechanical. It is a 100% native Linux solution, since I won't use WINE.

    I fear you may be right, which is a huge shame and quite a hurdle for those of us with visual problems accessing any Linux OS. I have in the past used all sorts of voices (I've been visually impaired since 1987), but trying to move to Ubuntu with the default voices is like going back to 1995.

    if I have any success I'll update this original question and answer myself below.

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
  •