https://github.com/samarjiit/audiobook
https://github.com/samarjiit/audiobook
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/samarjiit/audiobook
- Owner: Samarjiit
- Created: 2021-02-08T18:19:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-08T18:57:35.000Z (over 5 years ago)
- Last Synced: 2025-11-29T13:59:29.154Z (8 months ago)
- Language: Python
- Size: 12.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# audiobook
creating an audiobook using python.
in this project we can convert pdf into the audio file.
## Packages Used:
pyttsx3: It is a Python library for Text to Speech. It has many functions which will help the machine to communicate with us. It will help the machine to speak to us
PyPDF2: It will help to the text from the PDF. A Pure-Python library built as a PDF toolkit. It is capable of extracting document information, splitting documents page by page, merging documents page by page etc.
## STEPS
Import the PyPDF2 and pyttx3 modules.
Open the PDF file.
Use PdfFileReader() to read the PDF. We just have to give the path of the PDF as the argument.
Use the getPage() method to select the page to be read.
Extract the text from the page using extractText().
Instantiate a pyttx3 object.
Use the say() and runwait() methods to speak out the text.