1

I have a 70 chapter book that I need to have read aloud to me. My sight is failing after 45 years. I need book.txt translated to book.mp3.

1

First, run the following commands to install the dependencies:

sudo apt update
sudo apt install lame espeak

Next, run the following commands to convert the file from text to wave to mp3:

espeak -s 155 -a 200 -f book.txt -w book.wav
lame -V2 book.wav book.mp3

If you don't want the wav file you can delete the file.

The espeak command options set the speed of words per minute to 155 and the amplitude to 200.

Use espeak --help for more options.

| improve this answer | |
  • Just found this! Alz, ?... --{worde than death.} For the record, I pieced things together and used the info above to create a scipt that works fine. – Gary Kline Sep 11 '19 at 21:34
0

If you have a dual boot, try using Balabolka .. Or borrow a friend's computer. The official website (be careful) is http://www.cross-plus-a.com/balabolka.htm

Balabolka does work in Wine but it is 32bit so follow the instructions.

I think I used this webpage to follow the directions.. https://www.reddit.com/r/linux/comments/6z41qb/my_text_to_speech_tts_solution_wine_microsoft/

The content from that page is:

The Solution. It was surprisingly simple. Download the 32bit version of SpeechPlatformRuntime.msi from https://www.microsoft.com/en-us/download/details.aspx?id=27225 and MSSpeech_TTS_en-US_ZiraPro.msi from https://www.microsoft.com/en-us/download/details.aspx?id=27224 this should work with the other voices as well.

$export WINEARCH=win32
$export WINPREFIX=~/.wine32
$winetricks msxml3
$wine msiexec /i SpeechPlatformRuntime.msi
$wine msiexec /i MSSpeech_TTS_en-US_ZiraPro.msi

After that you should be able to use any windows tts program that uses Microsoft Speech Platform v11. I use Balabolka's Command Line Utility http://www.cross-plus-a.com/bconsole.htm it's a simple console app and doesn't require any extra dependencies.

| improve this answer | |
0

There are many online services that let you convert a TXT file to MP3. for example: https://onlineconvertfree.com/convert-format/txt-to-mp3/

There are many others.

If you want to be able to do this offline, you can write a simple python sript, see this discussion: https://stackoverflow.com/questions/19683282/how-can-i-convert-a-text-file-to-audio-mp3-using-ffmpeg-on-ubuntu-11-04

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.