Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lang_check=True,
pre_processor_funcs=None,
tokenizer_func=gtts.tts.Tokenizer([
gtts.tts.tokenizer_cases.tone_marks,
gtts.tts.tokenizer_cases.period_comma,
gtts.tts.tokenizer_cases.other_punctuation
]).run,
**_
):
if pre_processor_funcs is None:
pre_processor_funcs = [
gtts.tts.pre_processors.tone_marks,
gtts.tts.pre_processors.end_of_line,
gtts.tts.pre_processors.abbreviations,
gtts.tts.pre_processors.word_sub
]
# Text
assert text, 'No text to speak'
self.text = text
# Language
if lang_check:
try:
langs = gtts.tts.tts_langs()
if lang.lower() not in langs:
raise ValueError("Language not supported: %s" % lang)
except RuntimeError:
pass
self.lang_check = lang_check
self.lang = lang.lower()
slow=False,
lang_check=True,
pre_processor_funcs=None,
tokenizer_func=gtts.tts.Tokenizer([
gtts.tts.tokenizer_cases.tone_marks,
gtts.tts.tokenizer_cases.period_comma,
gtts.tts.tokenizer_cases.other_punctuation
]).run,
**_
):
if pre_processor_funcs is None:
pre_processor_funcs = [
gtts.tts.pre_processors.tone_marks,
gtts.tts.pre_processors.end_of_line,
gtts.tts.pre_processors.abbreviations,
gtts.tts.pre_processors.word_sub
]
# Text
assert text, 'No text to speak'
self.text = text
# Language
if lang_check:
try:
langs = gtts.tts.tts_langs()
if lang.lower() not in langs:
raise ValueError("Language not supported: %s" % lang)
except RuntimeError:
pass
self.lang_check = lang_check
text,
lang='en',
slow=False,
lang_check=True,
pre_processor_funcs=None,
tokenizer_func=gtts.tts.Tokenizer([
gtts.tts.tokenizer_cases.tone_marks,
gtts.tts.tokenizer_cases.period_comma,
gtts.tts.tokenizer_cases.other_punctuation
]).run,
**_
):
if pre_processor_funcs is None:
pre_processor_funcs = [
gtts.tts.pre_processors.tone_marks,
gtts.tts.pre_processors.end_of_line,
gtts.tts.pre_processors.abbreviations,
gtts.tts.pre_processors.word_sub
]
# Text
assert text, 'No text to speak'
self.text = text
# Language
if lang_check:
try:
langs = gtts.tts.tts_langs()
if lang.lower() not in langs:
raise ValueError("Language not supported: %s" % lang)
except RuntimeError:
pass
lang='en',
slow=False,
lang_check=True,
pre_processor_funcs=None,
tokenizer_func=gtts.tts.Tokenizer([
gtts.tts.tokenizer_cases.tone_marks,
gtts.tts.tokenizer_cases.period_comma,
gtts.tts.tokenizer_cases.other_punctuation
]).run,
**_
):
if pre_processor_funcs is None:
pre_processor_funcs = [
gtts.tts.pre_processors.tone_marks,
gtts.tts.pre_processors.end_of_line,
gtts.tts.pre_processors.abbreviations,
gtts.tts.pre_processors.word_sub
]
# Text
assert text, 'No text to speak'
self.text = text
# Language
if lang_check:
try:
langs = gtts.tts.tts_langs()
if lang.lower() not in langs:
raise ValueError("Language not supported: %s" % lang)
except RuntimeError:
pass