-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gTTS 2.0.0 #108
Merged
Merged
gTTS 2.0.0 #108
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…on existing languages, Unicode manipulations, input with no spaces
…thod in tts. Added tokenizing logging
…ode, using gtts.tokenizer.symbols.ALL_PUNC as punctuation for utils._ALL_PUNC_OR_SPACE regex
…reProcessorSub; various doc fix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I am super happy to announce the release of
gTTS
2.0.0
! This is pretty much a rewrite with ton of new cool stuff and fixes which I've been working on for the past few months. See below!Also see new docs at http://gtts.readthedocs.io/
Upgrading to 2.0.0
Most users will have nothing to change!
See Deprecations and Removals below.
Features
gtts
moduleprint()
gtts.lang
) (Supporting Languages #91, Filipino Language Support #94, when use "zh-yue" occured HTTPError: 404 Client Error #106)gTTS()
parameterlang_check
to disable language checking.gTTS()
now delegates thetext
tokenizing to the API request methods (i.e.write_to_fp()
,save()
), allowinggTTS
instances to be modified/reusedgTTS()
parameterspre_processor_funcs
andtokenizer_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 ('NoneType' object has no attribute 'group' #60, when use "zh-yue" occured HTTPError: 404 Client Error #106)gTTS.write_to_fp()
andgTTS.save()
also raisegTTSError
ongtts_token
errorgTTS.write_to_fp()
raisesTypeError
whenfp
is not a file-like object or one that doesn't take bytesgTTS()
raisesValueError
on unsupported languages (andlang_check
isTrue
)request failed
vs.request successful with a bad response
)gtts.tokenizer
)gtts.tokenizer.core.Tokenizer
)RegexBuilder
,PreProcessorRegex
andPreProcessorSub
classes to make writing regex-powered textpre-processors
andtokenizer cases
easiergtts-cli
command-line toolgtts.cli
), powered by Clicksetuptool
'sentry_points
--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 fromstdin
--debug
flag uses logging and doesn't pollutestdout
anymoreBugfixes
_minimize()
: Fixed an infinite recursion loop that would occur when a token started with the miminizing delimiter (i.e. a space) (Missing punctuation #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) (Fixed unicode decoding issue. #78, codec can't decode byte 0xe3 in position 0: ordinal not in range(128) #93, Can't make mp3 file from the text in Romanian #96)Deprecations and Removals
debug
parameter ofgTTS
(in favour of logger)gtts-cli
: Changed long option name of-o
to--output
instead of--destination
gTTS()
will raise aValueError
rather than anAssertionError
on unsupported languageImproved Documentation
Misc
TEST_LANGS
enviromment variable so not all language tests are run every time.