LibreAI / Audio / gTTS
// audio · pndurette/gTTS

gTTS

gTTS est un projet de audio open source, créé par pndurette (pndurette/gTTS sur GitHub). Il compte 2 636 étoiles sur GitHub et 390 forks, il est publié sous la licence MIT et a été mis à jour pour la dernière fois sur GitHub le 6 avril 2026.

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

★ 2,6 k étoiles⑂ 390 forksMITmis à jour avr. 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 636
Forks
390
Licence
MIT
Dernière mise à jour sur GitHub
6 avril 2026
Catégorie
Audio
Type de fiche
Guide d'installation complet
Site officiel
Official site
// fonctionnement

Comment ça marche

  1. Clarify your goal

    Decide the text, language and output: an mp3 file, bytes for further audio processing, or stdout in a pipeline.

  2. Get gTTS

    pip install gTTS — no credentials or project setup needed.

  3. Configure

    In code, pass the text and language to gTTS(...); optionally add pre-processors for pronunciation fixes.

  4. Run your first synthesis

    Save your first mp3 with tts.save(...) or the gtts-cli command, and play it back.

// fonctionnalités

Pourquoi on l'adore

Library + CLI

Use the gTTS class in Python or the gtts-cli command for one-off conversions.

Long-text tokenizer

A customizable speech-specific sentence tokenizer allows unlimited text lengths while preserving intonation, abbreviations and decimals.

Text pre-processors

Customizable pre-processing hooks can, for example, provide pronunciation corrections.

Flexible output

Write spoken mp3 to a file, a file-like object (bytestring) for further manipulation, or stdout.

Many languages

Language selection follows Google Translate's TTS voices (pass the language code to gTTS).

Zero setup

No API key or cloud project — it calls the public Google Translate speech endpoint (internet required).

Advertisement
// lancez-le

Lancez-le vous-même

  1. Clone the repo

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

    git clone https://github.com/pndurette/gTTS.git
    cd gTTS
  2. Install

    Install gTTS from PyPI.

    pip install gTTS
  3. Synthesize speech

    Use the CLI quickstart, or the three-line Python module example.

    gtts-cli 'hello' --output hello.mp3
    # Python: from gtts import gTTS; gTTS('hello').save('hello.mp3')
// cas d'usage

Ce que vous pouvez créer

Advertisement
// faq

Questions fréquentes

Who maintains gTTS?

pndurette (Pierre Nicolas Durette) and contributors maintain it; documentation is at gtts.readthedocs.org.

Is gTTS free?

Yes, MIT-licensed, and the endpoint it uses needs no key. The README warns it relies on an undocumented Google Translate feature, so upstream breaking changes can occur without notice.

Does it need a paid API key?

No key at all — but it does need internet access to reach Google Translate's speech service.

How does it compare to pyttsx3 or Google Cloud TTS?

pyttsx3 works fully offline with system voices; Google Cloud TTS is the official paid API with more voices and an SLA. gTTS sits in between: free and simple, but online and unofficial.

How do I get started?

pip install gTTS, then gtts-cli 'hello' --output hello.mp3.

// continuez l'exploration

Outils similaires

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

fastrtc

FastRTC turns any Python function into a real-time audio or video stream over WebRTC or WebSockets

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

pyttsx3

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

★ 2,5 k étoilesMPL-2.0
Voir le guide →
Audio

whisper.api

A ready API for speech-to-text with per-user access control.

★ 914 étoilesMIT
Voir le guide →
Audio

voxt

A macOS voice assistant that turns speech into actions and notes.

★ 853 étoilesCustom
Voir le guide →
Audio

Mozilla TTS

Mozilla's deep-learning text-to-speech library with Tacotron, Glow-TTS and neural vocoders.

★ 10,2 k étoilesMPL-2.0
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 gTTS 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 gTTS — continuez à explorer de part et d'autre.

Obtenir gTTS

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