Results 1 to 10 of 10

Thread: From Text to Speech: offline program.

  1. #1
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    From Text to Speech: offline program.

    I use an online program called "From Text To Speech," that works great, that is when it is working. I find that their site is down or working slow when it is overused.
    Maybe I should not complain because it is free to use. But seeing I use it a lot, I was wondering if someone knows of a stand-alone program that is not an online app.
    How the program works and what it does:
    I copy and paste a text file into it, and it converts it to an audio file using a digital voice. It allows you to chose a language, a voice, and the speed of reading. After it is done it allows you to save the file as an mp3 format.
    Does anyone know of a program like this?
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  2. #2
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,792

    Re: From Text to Speech: offline program.

    There are many solutions.

    $ espeak "I cannot do that, Dave." >dave.wav
    $ sox dave.wav dave.mp3

    Or as a one liner:
    $ espeak "I cannot do that, Dave." | sox - dave.mp3

  3. #3
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: From Text to Speech: offline program.

    Yes, that will work, but it is one of the worst digital voices I've ever heard. I create audiobooks, and that would be like listening to a robot.
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  4. #4
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,792

    Re: From Text to Speech: offline program.

    If don't like the voice, install Festival and get a different voice. It has a few good voices, male and female, including an Irish voice that sounds like Apple Siri.

  5. #5
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: From Text to Speech: offline program.

    I have it set up to read the selected text but would like to pipe it to an mp3 file. How would I assign it to do this?
    Code:
    xsel | festival --tts --pipe
    I created a sample audio file I would like to use, but have no idea where to file it.
    This is what it sounds like.
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: From Text to Speech: offline program.

    I use something like:
    Code:
    espeak -f myfile --stdout | ffmpeg -i - -ar 44100 -ac 2 -ab 192k -f mp3 final.mp3
    Change to your needs
    EDIT I should mention that>> the --stdout option to espeak will tell it to write the audio data to stdout instead of putting it through the audio device. From there you can pipe it into e.g. ffmpeg for conversion to the proper format.
    EDIT2: To use the voice you need use something along the lines of this:
    Code:
     espeak -v mb-en1 -f '/home/me/Documents/a surround sound setup.' --stdout | ffmpeg -i - -ar 44100 -ac 2 -ab 192k -f mp3 1final.mp3
    Last edited by 1fallen; October 26th, 2018 at 05:47 PM. Reason: Added more info
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags | System-info | Forum Guide lines | Arch Linux, Debian Unstable, FreeBSD

  7. #7
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,792

    Re: From Text to Speech: offline program.

    There are many ways to skin this cat:
    $ xsel | festival --tts --pipe >file.wav
    $ xsel | festival --tts --pipe | sox - file.mp3
    $ xsel | festival --tts --pipe | ffmpeg -i - -ar 44100 -ac 2 -ab 192k -f mp3 file.mp3

  8. #8
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: From Text to Speech: offline program.

    Thanks a lot for all the help. When I find the right voice I will have to play around with all these commands. I have already made a script to read text from anywhere that I highlight it. But I still don't like the voice. I wish I could find Harry's voice file, the one I posted a sample on.
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

  9. #9
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,792

  10. #10
    Join Date
    Oct 2005
    Location
    Wabasha MN
    Beans
    2,571
    Distro
    Ubuntu

    Re: From Text to Speech: offline program.

    Thanks for all the input. I will mark the thread as solved.
    Information on my Main laptop. Information on my small laptop Dell 11 3000
    Using a Asus 3632QM laptop with 8gig RAM, 250 SSD.
    Machine Registered 366271, 366273, 366275.
    Registered Ubuntu user number 18630. Registered Linux user number 458093.

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
  •