MCPcopy
hub / github.com/elebumm/RedditVideoMakerBot / process_text

Function process_text

TTS/engine_wrapper.py:181–188  ·  view source on GitHub ↗
(text: str, clean: bool = True)

Source from the content-addressed store, hash-verified

179
180
181def process_text(text: str, clean: bool = True):
182 lang = settings.config["reddit"]["thread"]["post_lang"]
183 new_text = sanitize_text(text) if clean else text
184 if lang:
185 print_substep("Translating Text...")
186 translated_text = translators.translate_text(text, translator="google", to_language=lang)
187 new_text = sanitize_text(translated_text)
188 return new_text

Callers 3

imagemakerFunction · 0.90
runMethod · 0.85
split_postMethod · 0.85

Calls 2

sanitize_textFunction · 0.90
print_substepFunction · 0.90

Tested by

no test coverage detected