Installation
To read PDF file using Python pip install pypdf2 and To Read text (Text to speech) pip install pyaudio pip install pyttsx3
Note: This code can read all the printable text from a PDF file/ Book
PDF Text-to-Speech Reader This Python script utilizes the pyttsx3 and PyPDF2 modules to convert the text from a PDF file into speech. It reads the specified PDF file and narrates the content using text-to-speech.
Notes Adjust the file name ('oop.pdf') to match the name of your PDF file.
The script reads all pages in the PDF file. Modify the range in the loop if you want to read a specific range of pages.
Ensure that the pyttsx3 module is compatible with your operating system for text-to-speech functionality.
This script uses the PyPDF2 module, which may have limitations with complex PDF structures.