pyttsx3 is a Python library that converts text to speech completely offline. Unlike cloud-based TTS services, it doesn’t require an internet connection and works on Windows, macOS, and Linux. It supports multiple voices, adjustable speech rate, and volume control, making it ideal for building accessibility tools, voice assistants, and educational software.
Installation:
pip install pyttsx3
Example usage:
import pyttsx3
engine = pyttsx3.init()
engine.setProperty("rate", 150)
engine.setProperty("volume", 0.9)
engine.say("Hello, I am speaking using pyttsx3!")
engine.runAndWait()
PyPI page: https://pypi.org/project/pyttsx3/
GitHub page: https://github.com/nateshmbhat/pyttsx3
3 Project Ideas:
- Build a desktop voice assistant that reads notifications or reminders.
- Create an audiobook generator that converts text files to speech.
- Develop a learning app that reads text aloud for language learners.
Top comments (0)