Last active
February 19, 2021 06:07
-
-
Save AIAnytime/38677d3985e5b13061419b21587d2ccc to your computer and use it in GitHub Desktop.
Convert PDF File text to audio speech using Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
import PyPDF2 | |
path = open('resume.pdf', 'rb') | |
pdf_reader = PyPDF2.PdfFileReader(path) | |
from_page = pdfReader.getPage(0) | |
text = from_page.extractText() | |
speak = pyttsx3.init() | |
speak.say(text) | |
speak.runAndWait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment