1import pyttsx3
2import PyPDF2
3
4book = open("File Name document","rb")
5pdfreader = PyPDF2.PdfFileReader(book)
6pages_in_book = pdfreader.numPages
7for num in range(0,pages_in_book):
8 page = pdfreader.getPage(num)
9 text = page.extractText()
10 speeaker = pyttsx3.init()
11 speeaker.say(text)
12 speeaker.runAndWait()
13#output
14#python will start reading your document