Skip to main content

gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate text-to-speech API

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gtts-2.5.4.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

gTTS-2.5.4-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file gtts-2.5.4.tar.gz.

File metadata

  • Download URL: gtts-2.5.4.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gtts-2.5.4.tar.gz
Algorithm Hash digest
SHA256 f5737b585f6442f677dbe8773424fd50697c75bdf3e36443585e30a8d48c1884
MD5 e866c23894f3ef19ce217d84bde68a37
BLAKE2b-256 57795ddb1dfcd663581d0d3fca34ccb1d8d841b47c22a24dc8dce416e3d87dfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for gtts-2.5.4.tar.gz:

Publisher: release.yml on pndurette/gTTS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gTTS-2.5.4-py3-none-any.whl.

File metadata

  • Download URL: gTTS-2.5.4-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gTTS-2.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd579377f9f5546893bc26315ab1f846933dc27a054764b168f141065ca8436
MD5 e75ec6127d3c9daabd8fe908783225c3
BLAKE2b-256 e36c8b8b1fdcaee7e268536f1bb00183a5894627726b54a9ddc6fc9909888447

See more details on using hashes here.

Provenance

The following attestation bundles were made for gTTS-2.5.4-py3-none-any.whl:

Publisher: release.yml on pndurette/gTTS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page