Convert Text to Speech

To convert a plain text file to an mp3, use the espeakarrow-up-right speech synthesizer and ffmpegarrow-up-right 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 pdftotextarrow-up-right.

pdftotext Book.pdf - | espeak --stdout | ffmpeg -i - -ab 192k -y AudioBook.mp3

Last updated