Turn any PDF into a talking book using Python! This beginner-friendly project uses text-to-speech (TTS) and PDF reading tools to create your very own audiobook.
- 🔊 Reads PDF books out loud
- 🗂️ Choose starting page
- 🗣️ Custom speech rate and volume
- 🧠 Offline! No internet needed
- 🎙️ Supports voice selection (Windows)
git clone https://github.com/NASakib143/Smart-Audio-Book-for-beginner-Python-.git
cd Smart-Audio-Book-for-beginner-Python-
pip install pyttsx3 PyPDF2
Place your .pdf
file in the same folder. Example:
The 10 Mental Laws and the Power on Mind Author Barbara Berger.pdf
python main.py
from pyttsx3 import init
from PyPDF2 import PdfReader
book = open('bookname.pdf', 'rb')
reader = PdfReader(book)
pages = len(reader.pages)
engine = init()
engine.setProperty('rate', 180)
engine.setProperty('volume', 1.0)
for i in range(start_page, pages):
text = reader.pages[i].extract_text()
engine.say(text)
engine.runAndWait()
- 🎙️ Add voice selector (male/female)
- 💾 Save audio as
.mp3
files - 🎛️ GUI with Tkinter
- ⏯️ Pause/resume options
- 🎯 Choose specific page range
MIT License. Free to use, modify, and share.
Made with 💙 by NASakib143
Enjoy hands-free learning! 🎧📖🧠