pyttsx3
Text to Speech (TTS) library for Python 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak.
What it is and what it does
pyttsx3 is a Python library that performs text-to-speech conversion entirely offline, without requiring internet access or external API calls. It wraps platform-native TTS engines: SAPI5 on Windows, AVSpeech and NSSpeechSynthesizer on macOS, and eSpeak on Linux. You initialize an engine, configure voice, rate, and volume properties, then call methods to speak text aloud or save it as an audio file.
The library is designed for developers and end users who need reliable, low-latency speech synthesis without cloud dependencies. It supports multiple voices where available on the system and exposes a simple API for both quick one-liners and detailed engine configuration. Platform-specific runtime dependencies (Windows COM bindings, macOS Objective-C bridge, Linux eSpeak) are pulled in automatically, though Linux users must install espeak-ng and libespeak1 system packages separately.
Use it for:
- Build accessibility features into desktop or CLI applications that read text aloud for visually impaired users.
- Create voice-based notifications or alerts in automation scripts without relying on external APIs.
- Generate audio files from text for offline use in educational or training materials.
- Add voice output to chatbots or interactive command-line tools running on local machines.
- Prototype voice-enabled features in applications where cloud TTS latency or cost is prohibitive.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pyttsx3 converts text to speech offline using your system's native TTS engines, with control over voice, speed, volume, and the ability to save audio to files.
Yes, if you need offline text-to-speech. The library is actively maintained, has no known vulnerabilities, and installs with low friction. The MPL-2.0 copyleft license is permissive for most use cases. Main caveat: platform-specific system dependencies (especially on Linux) and the need to manage multiple OS-level TTS engines mean setup varies by OS. Suitable for developers building accessibility, automation, or voice features into local applications.
Install
pyttsx3 on PyPI
pip
pip install pyttsx3uv
uv add pyttsx3poetry
poetry add pyttsx3Installing pyttsx3
Before you install
Low friction install with a pure-Python wheel. Maintenance is active with recent commits and a healthy GitHub presence. Runtime dependencies are platform-specific OS bindings (comtypes, pyobjc, pypiwin32, pywin32) that may require system-level TTS libraries on Linux.
License in practice
Licensed under MPL-2.0 (copyleft). You may use and modify the library freely, but any modifications must be shared under the same license, and the license applies to the library code itself, not your application.
Quickstart
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
On Linux, espeak-ng and libespeak1 must be installed; on macOS, pyobjc>=9.0.1 may be required; Windows uses SAPI5 (built-in).
Verify before relying
- Whether all four runtime dependencies (comtypes, pyobjc, pypiwin32, pywin32) are required on all platforms or only on specific OS.
- Exact Python version floor (requires_python is unspecified in the fact sheet).
Package facts
| License | MPL-2.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — comtypes, pyobjc, pypiwin32, pywin32 |
| Maintenance | actively maintained — 402 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 906,177/month — #4,760 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyttsx3-2.99-py3-none-any.whl
Keywords: gtts, ivona, offline text to speech, offline tts, pyttsx, pyttsx for python3, pyttsx3, speech, speech synthesis, text to speech, text to speech for python, tts, TTS for python3
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
edge-ttsConverts text to speech using Microsoft Edge's…
copyleft · top 5,000 on PyPI
gTTSgTTS converts text to speech using Google…
permissive · top 5,000 on PyPI
piper-ttsPiper TTS is a local neural text-to-speech…
copyleft · top 5,000 on PyPI
pocket-ttsPocket TTS generates speech from text on CPU…
unclear · top 15,000 on PyPI
TTSTTS is a deep learning library for…
copyleft · top 15,000 on PyPI
kokoro-onnxConverts text to speech using ONNX Runtime,…
unclear · top 15,000 on PyPI
livekit-plugins-sonioxIntegrates Soniox speech-to-text and…
permissive · top 15,000 on PyPI
mlx-audioMLX-Audio provides text-to-speech,…
permissive · top 15,000 on PyPI
sileroSilero provides pre-trained text-to-speech…
permissive · top 15,000 on PyPI
kokoroKokoro is an inference library for the…
permissive · top 15,000 on PyPI