Overview
pyttsx3 is a Python library for offline text-to-speech (TTS) conversion. Unlike many TTS libraries that rely on online APIs, pyttsx3 operates locally by leveraging speech engines installed on the system (like eSpeak on Linux, NSSpeechSynthesizer on macOS, and SAPI5 on Windows). This offline functionality makes it ideal for applications where internet connectivity is unreliable or undesirable. The library provides a simple and intuitive API to convert text into speech, control the rate and volume of the speech, and select different voices installed on the system. It also supports saving the generated speech as an audio file. pyttsx3 acts as a wrapper around available system TTS engines, streamlining the process of integrating TTS functionality into Python applications without needing constant API calls to external services.
