Hey Guys! Today I'm just going to give you guys a quick overview of how to create your own Audiobooks with Python. Hope you guys enjoy and leave a comment below for any future videos and topics that you'd want me to do.
-
Code Below ⬇️
import PyPDF2
import pyttsx3
pdfReader = PyPDF2.PdfFileReader(open('book.pdf', 'rb'))
pages = pdfReader.numPages
speaker = pyttsx3.init()
for num in range(6, pages):
page = pdfReader.getPage(num)
text = page.extractText()
speaker.say(text)
speaker.runAndWait()
-
Follow my YouTube for more tutorials - https://youtube.com/channel/UCDtDzsugw6orecqlM3nf7_A
Check out my GitHub Portfolio - https://GitHub.com/adhamizain96
Check out my Website - https://www.adhamizain.me/
-
#python #pythonprogramming