We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cad2873 commit acfc1d2Copy full SHA for acfc1d2
PDF to Audio/audio_book.py
@@ -0,0 +1,15 @@
1
+import pyttsx3
2
+import PyPDF2
3
+book = open('python_basics.pdf','rb')
4
+val = input("Enter the page no from where you want to start: ")
5
+val_converted = int(val)
6
+start_page = val_converted-1
7
+pdfReader = PyPDF2.PdfFileReader(book)
8
+page = pdfReader.numPages
9
+print(page)
10
+speaker = pyttsx3.init()
11
+for num in range(start_page,page):
12
+ page = pdfReader.getPage(start_page)
13
+ text = page.extractText()
14
+ speaker.say(text)
15
+ speaker.runAndWait()
PDF to Audio/python_basics.pdf
326 KB
0 commit comments