LibreAI / Audio / pyttsx3
// audio · nateshmbhat/pyttsx3

pyttsx3

pyttsx3 est un projet de audio open source, créé par nateshmbhat (nateshmbhat/pyttsx3 sur GitHub). Il compte 2 534 étoiles sur GitHub et 361 forks, il est publié sous la licence MPL-2.0 et a été mis à jour pour la dernière fois sur GitHub le 22 juillet 2026.

Offline text-to-speech for Python — uses your operating system's own voices, no internet needed

★ 2,5 k étoiles⑂ 361 forksMPL-2.0mis à jour juil. 2026
▦ visuel — le README de ce projet ne contient aucune capture intégrable,
voici donc un emplacement réservé. Le guide ci-dessous est complet malgré tout.
// détails du projet

Détails du projet

Étoiles GitHub
2 534
Forks
361
Licence
MPL-2.0
Dernière mise à jour sur GitHub
22 juillet 2026
Catégorie
Audio
Type de fiche
Guide d'installation complet
// fonctionnement

Comment ça marche

  1. Clarify your goal

    Decide whether the app should speak aloud, save audio files, or both — and which installed system voices are available on your platform.

  2. Get pyttsx3

    pip install pyttsx3 (upgrade wheel first if installation errors occur).

  3. Install platform pieces

    On Linux install espeak-ng/libespeak1; on macOS with pyobjc errors, the README suggests pyobjc >= 9.0.1.

  4. Run your first utterance

    Initialize the engine, say a sentence with runAndWait(), then tune rate, volume and voice to taste.

// fonctionnalités

Pourquoi on l'adore

Fully offline

No network calls at all — synthesis uses local OS speech engines, so it works on planes and in sandboxes.

Cross-platform engines

Bundled drivers for eSpeak (Linux/macOS/Windows), NSSpeechSynthesizer and AVSpeech (macOS), and SAPI5 (Windows).

Voice selection

Enumerate the voices installed on your system and switch between them by voice ID.

Rate and volume control

Get and set speaking rate and volume (0 to 1) as engine properties.

Save to file

engine.save_to_file writes speech to an audio file (e.g. test.mp3) instead of playing it.

Tiny API

One-line pyttsx3.speak(...) for the default case, or a full engine object for control; docs at pyttsx3.readthedocs.io.

Advertisement
// lancez-le

Lancez-le vous-même

  1. Clone the repo

    Clone pyttsx3 if you want the source; most users install from PyPI in step 2.

    git clone https://github.com/nateshmbhat/pyttsx3.git
    cd pyttsx3
  2. Install

    Install the library from PyPI (on Linux also: sudo apt install espeak-ng libespeak1).

    pip install pyttsx3
  3. Speak your first line

    Use the README's minimal example — or the one-line pyttsx3.speak("I will speak this text").

    import pyttsx3
    engine = pyttsx3.init()
    engine.say("I will speak this text")
    engine.runAndWait()
// cas d'usage

Ce que vous pouvez créer

Advertisement
// faq

Questions fréquentes

Who maintains pyttsx3?

nateshmbhat maintains it, with full documentation at pyttsx3.readthedocs.io.

Is pyttsx3 free?

Yes, it is MPL-2.0 licensed and free to use.

Does it need a paid API key?

No key and no internet — it uses the voices your operating system already provides. Voice quality therefore depends on your platform's engines.

How does it compare to gTTS?

gTTS produces Google voices but needs internet and uses an unofficial endpoint. pyttsx3 is fully offline with system voices — less polished audio, but private and always available.

How do I get started?

pip install pyttsx3, then the three-line init/say/runAndWait example from the README.

// continuez l'exploration

Outils similaires

Audio

Scribe

A free offline desktop assistant for speech-to-text.

★ 39 étoilesMIT
Voir le guide →
Audio

gTTS

gTTS — Python library and CLI that turns text into spoken mp3 via Google Translate's speech API

★ 2,6 k étoilesMIT
Voir le guide →
Audio

sherpa-onnx

Speech-to-text, text-to-speech, speaker diarization, speech enhancement, source separation, and VAD using next-gen Kaldi with onnxruntime without Internet co…

★ 15,1 k étoilesApache-2.0
Voir le guide →
Audio

edge-tts

Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key

★ 12,2 k étoilesCustom
Voir le guide →
Audio

out-loud

Free, open source, 100% offline AI text-to-speech for macOS, Windows & Linux.

★ 87 étoilesNOASSERTION
Voir le guide →
// alternatives

Alternatives en Audio

Les autres projets de la catégorie Audio avec le plus d'étoiles du catalogue LibreAI — la sélection réaliste d'alternatives si pyttsx3 ne vous convient pas.

// plus en audio

Plus en Audio

Projets de la catégorie Audio proches dans le catalogue, les plus proches en étoiles de pyttsx3 — continuez à explorer de part et d'autre.

Obtenir pyttsx3

Gratuit et ouvert : récupérez le code source, mettez une étoile au dépôt et commencez à créer.