This script will create an audio file for each page of a PDF, reading it trought Fastspeech2 using fairseq framework. Perfect for creating audiobooks. It also reads the PDF table of contents and groups the files by the top level charapters. Finally it creates a playlist.
Tested on Ubuntu 22.04.1 and Python 3.10.6
$ pdfToAudio.py --pdf <your pdf file here>
You should have the conmand pdftotext
from poppler-utils
installed: