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/
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5737b585f6442f677dbe8773424fd50697c75bdf3e36443585e30a8d48c1884 |
|
MD5 | e866c23894f3ef19ce217d84bde68a37 |
|
BLAKE2b-256 | 57795ddb1dfcd663581d0d3fca34ccb1d8d841b47c22a24dc8dce416e3d87dfa |
Provenance
The following attestation bundles were made for gtts-2.5.4.tar.gz
:
Publisher:
release.yml
on pndurette/gTTS
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
gtts-2.5.4.tar.gz
- Subject digest:
f5737b585f6442f677dbe8773424fd50697c75bdf3e36443585e30a8d48c1884
- Sigstore transparency entry: 147988109
- Sigstore integration time:
- Permalink:
pndurette/gTTS@5007fa454d296ab77249ab706af4bc299e500401
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/pndurette
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
release.yml@5007fa454d296ab77249ab706af4bc299e500401
- Trigger Event:
push
- Statement type:
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dd579377f9f5546893bc26315ab1f846933dc27a054764b168f141065ca8436 |
|
MD5 | e75ec6127d3c9daabd8fe908783225c3 |
|
BLAKE2b-256 | e36c8b8b1fdcaee7e268536f1bb00183a5894627726b54a9ddc6fc9909888447 |
Provenance
The following attestation bundles were made for gTTS-2.5.4-py3-none-any.whl
:
Publisher:
release.yml
on pndurette/gTTS
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
gtts-2.5.4-py3-none-any.whl
- Subject digest:
5dd579377f9f5546893bc26315ab1f846933dc27a054764b168f141065ca8436
- Sigstore transparency entry: 147988110
- Sigstore integration time:
- Permalink:
pndurette/gTTS@5007fa454d296ab77249ab706af4bc299e500401
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/pndurette
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
release.yml@5007fa454d296ab77249ab706af4bc299e500401
- Trigger Event:
push
- Statement type: