Skip to main content

gTTS

gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate's text-to-speech API. Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout. https://gtts.readthedocs.io/

PyPI version Python versions Tests workflow codecov Commits Since PyPi Downloads Buy me a Coffee

Features

  • Customizable speech-specific sentence tokenizer that allows for unlimited lengths of text to be read, all while keeping proper intonation, abbreviations, decimals and more;
  • Customizable text pre-processors which can, for example, provide pronunciation corrections;

Installation

$ pip install gTTS

Quickstart

Command Line:

$ gtts-cli 'hello' --output hello.mp3

Module:

>>> from gtts import gTTS
>>> tts = gTTS('hello')
>>> tts.save('hello.mp3')

See https://gtts.readthedocs.io/ for documentation and examples.

Disclaimer

This project is not affiliated with Google or Google Cloud. Breaking upstream changes can occur without notice. This project is leveraging the undocumented Google Translate speech functionality and is different from Google Cloud Text-to-Speech.

Project

Licence

The MIT License (MIT) Copyright © 2014-2024 Pierre Nicolas Durette & Contributors

Release files for gTTS 2.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gTTS 2.5.4
File Size Uploaded
gtts-2.5.4.tar.gz 24.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gTTS 2.5.4
File Interpreter ABI Platform
gTTS-2.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 kB

Release files / gtts-2.5.4.tar.gz

Download URL gtts-2.5.4.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f5737b585f6442f677dbe8773424fd50697c75bdf3e36443585e30a8d48c1884
BLAKE2b-256 checksum
How to use checksums
57795ddb1dfcd663581d0d3fca34ccb1d8d841b47c22a24dc8dce416e3d87dfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2024.

Transparency log

Release files / gTTS-2.5.4-py3-none-any.whl

Download URL gTTS-2.5.4-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dd579377f9f5546893bc26315ab1f846933dc27a054764b168f141065ca8436
BLAKE2b-256 checksum
How to use checksums
e36c8b8b1fdcaee7e268536f1bb00183a5894627726b54a9ddc6fc9909888447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

2.5.4 This release

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.4

1 release file

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

3 release files

2.1.0

3 release files

2.0.4

3 release files

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page