PDF to Audio
import pyttsx3
import PyPDF2
book = open('ExpertPython.pdf', 'rb')
pdfReader = PyPDF2.PdfFileReader(book)
pages = pdfReader.numPages
speaker = pyttsx3.init()
for num in range(7, pages):
page = pdfReader.getPage(num)
text = page.extractText()
speaker.say(text)
speaker.runAndWait()
Comments
Post a Comment
Comment if you need help .I will not replay sometimes