Last updated 4 months ago
To convert a plain text file to an mp3, use the speech synthesizer and to save the audio as an mp3.
espeak -f Book.txt --stdout | ffmpeg -i - -ab 192k -y AudioBook.mp3
To convert a pdf to an mp3, use .
pdftotext Book.pdf - | espeak --stdout | ffmpeg -i - -ab 192k -y AudioBook.mp3