Here I made a small project of converting the given text into audio by using Python.
I made use of the module called "pdfplumber" which is mainly used from extracting text from the given set of input.
Later I used gTTS (google Text- To - Speech) which converts the given text into audio.
The basic format of doing so is mentioned in Audiobook_Python.py
Basic requirements of using this program is:
-
install the following modules: pip install pdfplumber pip install gTTS
-
Have a text ready that is needed to be converted into an audio file (If you have a text file then copy - paste text from it within the comments in the given code) Pro Tip- I use chatgpt for generating text : mostly the book summaries!
-
After you copied text into the given comments - just run the program and wait till it says "WORK DONE". Your file will be saved to the path which is used for saving your python programs.
The famous book summaries that I have uploaded include the following:
- Rich Dad Poor Dad by Robert T. Kiyosaki