- Keep ReadPDF.py and your PDF file in same folder
- Run the code
- Install pyttsx3 and PyPDF2
pyttsx3: Python Text To Speech | pyttsx module
- pyttsx is a cross-platform text to speech library which is platform independent. The major advantage of using this library for text-to-speech conversion is that it works offline. However, pyttsx supports only Python 2.x. Hence, we will see pyttsx3 which is modified to work on both Python 2.x and Python 3.x with the same code. Find more details about pyttsx here
PyPDF2: Working with PDF files in Python
- PyPDF2 is to handle PDF files in Python. Find more details about PyPDF2 here