LibreAI / 音声 / gTTS
// audio · pndurette/gTTS

gTTS

gTTSは、pnduretteが公開しているオープンソースの音声プロジェクトです(GitHub: pndurette/gTTS)。GitHubスターは2,636、フォークは390で、MITライセンスの下で公開されています。GitHubでの最終更新は2026年4月6日です。

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

★ 2.6k スター⑂ 390 フォークMIT更新 2026年4月
▦ ビジュアル — このプロジェクトのREADMEには埋め込み可能なスクリーンショットがないため、
ここではプレースホルダーを表示しています。下のガイド自体は完全な内容です。
// プロジェクトの基本情報

プロジェクト基本情報

リポジトリ
pndurette/gTTS
GitHubスター
2,636
フォーク
390
ライセンス
MIT
GitHubでの最終更新
2026年4月6日
カテゴリ
音声
掲載タイプ
完全なインストールガイド
公式サイト
Official site
// 仕組み

仕組み

  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.

// 機能

選ばれる理由

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
// 自分で実行

自分で実行してみる

  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')
// 活用例

作れるもの

Advertisement
// よくある質問

よくある質問

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.

// さらに探索

似ているツール

音声

edge-tts

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

★ 12.2k スターCustom
ガイドを見る →
音声

fastrtc

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

★ 4.6k スターMIT
ガイドを見る →
音声

pyttsx3

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

★ 2.5k スターMPL-2.0
ガイドを見る →
音声

whisper.api

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

★ 914 スターMIT
ガイドを見る →
音声

voxt

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

★ 853 スターCustom
ガイドを見る →
音声

Mozilla TTS

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

★ 10.2k スターMPL-2.0
ガイドを見る →
// 代替候補

代替候補: 音声

LibreAIカタログに掲載された音声プロジェクトの中で最もスターの多いもの — gTTSが合わなかった場合に検討したい、現実的な候補リストです。

// さらに見る audio

さらに見る: 音声

カタログの中でgTTSとスター数が近い音声プロジェクト — 前後の棚もそのまま見て回れます。

gTTSを入手する

無料でオープン — ソースコードを入手して、リポジトリにスターを付け、作り始めましょう。