To convert any PDF to audiobook, following steps must be followed:
-
Install Python module 'pyttsx3'
(To convert text to speech)
-
Install another Python module 'PyPDF2'
(To carry out PDF operations, to read, etc)
-
Make sure you have the PDF which you want to convert is in the same folder/directory where your main python file is.
-
Run the program file(after downloading) by following command:
python3 audiofile.py
-
Enter the name of your PDF file when its asks on terminal after running program.
And enjoy listening!!
NOTE: If there arises a problem with speaking, make sure your system has 'espeak' library installed. If not run the following command to install it:
sudo apt install espeak
If still the problem arises with speaking, you can mail me or message me.