Answers for "how to make your own audio book reader using python"

1

how to make your own audio book reader using python

import pyttsx3
import PyPDF2

book = open("File Name document","rb")
pdfreader = PyPDF2.PdfFileReader(book)
pages_in_book = pdfreader.numPages
for num in range(0,pages_in_book):
    page = pdfreader.getPage(num)
    text = page.extractText()
    speeaker = pyttsx3.init()
    speeaker.say(text)
    speeaker.runAndWait()
#output
#python will start reading your document
Posted by: Guest on August-12-2021

Code answers related to "how to make your own audio book reader using python"

Python Answers by Framework

Browse Popular Code Answers by Language