code:
import pyttsx3
import PyPDF2
op=open('your pdf name ', 'rb')
pdfReader = PyPDF2.PdfFileReader(op)
pages = pdfReader.numPages
print(pages)
speaker = pyttsx3.init()
page= pdfReader.getPage(1)
text= page.extractText()
speaker.say(text)
speaker.runAndWait()
website: http://krishnangd.c1.biz/
Github: https://github.com/krishnansuki
On this page of the site you can watch the video online 1minutevideo | Pythonprojects | Python | PDF reader | PDF Reader using audio with a duration of hours minute second in good quality, which was uploaded by the user Krishnan GD 30 April 2022, share the link with friends and acquaintances, this video has already been watched 43 times on youtube and it was liked by 6 viewers. Enjoy your viewing!