Files
RedditVideoMakerBot/TTS/GTTS.py
T
Jason c482266e5c reformatted using black
command
"black . --line-length 101"
2022-06-18 18:28:48 -04:00

14 lines
297 B
Python

from gtts import gTTS
class GTTS:
def tts(
self,
req_text: str = "Google Text To Speech",
filename: str = "title.mp3",
random_speaker=False,
censor=False,
):
tts = gTTS(text=req_text, lang="en", slow=False)
tts.save(f"{filename}")