PDF File Text to Audio Speech Conversion Using Python

file = open(‘demo.pdf’,’rb’)
pdf_reader = PyPDF2.PdfFileReader(book)
num_pages = pdf_reader.numPages
play = pyttsx3.init()print(‘Playing PDF File’)
for num in range(0,num_pages):page = pdf_reader.getPage(num)data= page.extractText()play.say(data)play.runAndWait()
import pyttsx3import PyPDF2file = open(‘demo.pdf’,’rb’)pdf_reader = PyPDF2.PdfFileReader(file)num_pages = pdf_reader.numPagesplay = pyttsx3.init()print(‘Playing PDF File’)for num in range(0,num_pages):page = pdf_reader.getPage(num)data= page.extractText()play.say(data)play.runAndWait()

QA Detective Conf 2021: Nov 20 & 21' 2021

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
QA Talks Community

QA Talks Community

373 Followers

Welcome to QA Talks, a community-based startup that's mainly focused on QA blogs & talks — https://www.tech-talks.info/