NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3770 most downloaded on PyPI
gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate text-to-speech API
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 39 of 39 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
39 releases · first in 2014
langs: Language added: fr-CA (French (Canada))
langs: Languages added: pt-PT (Portuguese (Portugal)), yue (Cantonese); languages modified: pa (Punjabi (Gurmukhi)), pt (Portuguese (Brazil))
One column per quarter.
langs: Languages added: am (Amharic), cy (Welsh), eu (Basque), gl (Galician), ha (Hausa), lt (Lithuanian), pa (Punjabi)
2.5.1 (2024-01-29) Bug Fixes Flush file after saving
Add an optional timeout parameter to gTTS that gets passed to the underlying HTTPS request
Remove Python 3.7 support (end-of-life)
cli: Add deprecated language fallback support to CLI
test: include missing required *.txt test files in dist
Centralize project metadata and config into a single pyproject.toml
Added new gTTS.stream() method to stream bytes
gTTS.stream() method to stream bytes (#319)Full Changelog: v2.2.3...v2.2.4 / CHANGELOG.rst
Added Bulgarian language support (\#302)
Adds a language fallback feature for deprecated languages to maintain compatiblity (e.g. en-us becomes en). Fallback can be disabled with lang_check=F…
en-us becomes en). Fallback can be
disabled with lang_check=False or --nocheck for the cli (#267)en-us, en-ca, en-uk, en-gb, en-au,
en-gh, en-in, en-ie, en-nz, en-ng, en-ph, en-za,
en-tz, fr-ca, fr-fr, pt-br, pt-pt, es-es, es-us,
zh-cn, zh-tw (#267)gtts.get_url() method (outdated since 2.1.0) (#270)_package_rpc() was erroneously packaging the entire text instead of tokenized part (\#252)
Switch to the newer Google TTS API (thanks to@Boudewijn26!). See his great writeup for more on the methodology and why this was necessary. (\#226, #23
gTTS. (#233, #241, #242, #243)Debug mode now uses a copy of locals() to prevent RuntimeError (\#213)
Added the ability to customize the Google Translate URL hostname. This is useful when google.com might be blocked within a network but a local or diff
gtts module
google.com might be blocked
within a network but a local or different Google host (e.g.
google.cn) is not (#143, #203):
gTTS() parameter tld to specify the top-level domain
to use for the Google hostname, i.e
https://translate.google.<tld> (default: com).mp3 file to disk (for example to be used in an
external program):
get_urls() method returns the list of URLs generated
by gTTS, which can be used in lieu of write_to_fp() or
save().gtts-cli command-line tool
('M.', 'Monsieur'))
which would substitute any 'm.' for 'monsieur' (e.g. 'them.'
became 'themonsieur') (#197)Added new tokenizer case for \':\' preventing cut in the middle of a time notation (\#135)
Added Python 3.7 support, modernization of packaging, testing and CI (\#126)
Fixed an UnicodeDecodeError when installing gTTS if system locale was not utf-8 (\#120)
New logger (\"gtts\") replaces all occurrences of print()
(#108)
gtts module
print()gtts.lang) (#91, #94, #106)gTTS() parameter lang_check to disable language
checking.gTTS() now delegates the text tokenizing to the API request
methods (i.e. write_to_fp(), save()), allowing gTTS
instances to be modified/reusedgTTS() parameters pre_processor_funcs and
tokenizer_func to configure pre-processing and tokenizing (or
use a 3rd party tokenizer)gTTSError raised on API request
errors. It attempts to guess what went wrong based on known
information and observed behaviour (#60, #106)gTTS.write_to_fp() and gTTS.save() also raise
gTTSError on [gtts_token]{.title-ref} errorgTTS.write_to_fp() raises TypeError when fp is not a
file-like object or one that doesn't take bytesgTTS() raises ValueError on unsupported languages (and
lang_check is True)gtts.tokenizer)gtts.tokenizer.core.Tokenizer)RegexBuilder, PreProcessorRegex and PreProcessorSub
classes to make writing regex-powered text
[pre-processors]{.title-ref} and [tokenizer cases]{.title-ref}
easiergtts-cli command-line tool
gtts.cli), powered
by Click--nocheck flag to skip language pre-checking--all flag to list all available languages--file option or the <text> argument can be set
to "-" to read from stdin--debug flag uses logging and doesn't pollute stdout
anymore_minimize(): Fixed an infinite recursion loop that would occur
when a token started with the miminizing delimiter (i.e. a space) (#86)_minimize(): Handle the case where a token of more than 100
characters did not contain a space (e.g. in Chinese).gtts-cli Unicode errors in Python 2.7 (famous last words) (#78, #93, #96)debug parameter of gTTS (in favour of logger)gtts-cli: Changed long option name of -o to --output instead
of --destinationgTTS() will raise a ValueError rather than an AssertionError
on unsupported languageUpdate LICENCE, add to manifest (\#77)
Add Unicode punctuation to the tokenizer (such as for Chinese and Japanese) (\#75)
Option for slower read speed (slow=True for gTTS(), --slow for gtts-cli) (\#40, \#41, \#64, \#67)
slow=True for gTTS(), --slow for
gtts-cli) (#40, #41, #64, #67)Added stdin support via the \'-\' text argument to gtts-cli (\#56)
stdin support via the '-' text argument to gtts-cli (#56)Added utf-8 support to gtts-cli (\#52)
gtts-cli (#52)Added \'bn\' : \'Bengali\' (\#39, \#44)
Fixed HTTP 403s by updating the client argument to reflect new API usage (\#32, \#33)
Spun-off token calculation to gTTS-Token (\#23, \#29)
gtts-cli works with Python 3 (\#20)
Added gTTS token (tk url parameter) calculation (\#14, \#15, \#17)
Added stdout support to gtts-cli, text now an argument rather than an option (\#10)
stdout support to gtts-cli, text now an argument rather
than an option (#10)Raise an exception on bad HTTP response (4xx or 5xx) (\#8)
write_to_fp() to write to a file-like object (\#6)
write_to_fp() to write to a file-like object (#6)Added Languages: zh-yue : Chinese (Cantonese), en-uk : English (United Kingdom), pt-br: Portuguese (Brazil), es-es: Spanish (Spain), es-us : Spanish (
zh-yue : Chinese (Cantonese),
en-uk : English (United Kingdom),
pt-br: Portuguese (Brazil), es-es:
Spanish (Spain), es-us : Spanish (United StateS), zh-cn: Chinese (Mandarin/China),
zh-tw: Chinese (Mandarin/Taiwan) (#4)gtts-cli print version and pretty printed available languages,
language codes are now case insensitive
(#4)Added Languages: \'en-us\' : \'English (United States)\', \'en-au\' : \'English (Australia)\' (\#3)
### Features - Python 3 support
### Features - Initial release
Your coding agent can read these notes before it upgrades. Set up the MCP server →