#!/usr/bin/env python
# coding: utf-8
# In[31]:
pip install PyPDF2
# In[32]:
pip install pyttsx3
# In[33]:
#pip install PyPDF2
import PyPDF2
# In[34]:
#pip install pyttsx3
import pyttsx3
# In[35]:
pdfReader=PyPDF2.PdfFileReader(open('C:\\Users\\Irawen\\Documents\\embedded\\Python\\clcoding.pdf','rb'))
# In[36]:
speaker = pyttsx3.init()
# In[37]:
for page_num in range(pdfReader.numPages):
text = pdfReader.getPage(page_num).extractText()
speaker.say(text)
speaker.runAndWait()
# In[38]:
speaker.stop()
# In[ ]:
0 Comments:
Post a Comment