pip install PyPDF2
pip install pyttsx3
```python
import PyPDF2
import pyttsx3
# Read the pdf by specifying the path in your computer
pdfReader = PyPDF2.PdfFileReader(open('clcoding.pdf', 'rb'))
# Get the handle to speaker
speaker = pyttsx3.init()
# split the pages and read one by one
for page_num in range(pdfReader.numPages):
text = pdfReader.getPage(page_num).extractText()
speaker.say(text)
speaker.runAndWait()
# stop the speaker after completion
speaker.stop()
# save the audiobook at specified path
engine.save_to_file(text, 'E:\audio.mp3')
engine.runAndWait()
`
🔅 Create an Audiobook in Python
👍57👎1
190_Python_Interview_Questions_and_Answers_pdf_20240111_090821_0000.pdf
2 MB
Python Interview Questions and Answers
👍21
👍15
Official Python Docs
https://docs.python.org/3/
Tools:
http://docs.python-guide.org/en/latest/dev/virtualenvs/
http://www.pythonforbeginners.com/basics/python-pip-usage
Practice:
http://www.practicepython.org/
https://www.hackerrank.com
https://wiki.python.org/moin/PythonDecorators
Python GUI FAQ
https://docs.python.org/3/faq/gui.html
https://docs.python.org/3/
Tools:
http://docs.python-guide.org/en/latest/dev/virtualenvs/
http://www.pythonforbeginners.com/basics/python-pip-usage
Practice:
http://www.practicepython.org/
https://www.hackerrank.com
https://wiki.python.org/moin/PythonDecorators
Python GUI FAQ
https://docs.python.org/3/faq/gui.html
👍16