tts language selection

pull/564/head
SinecKers 2 years ago
parent c50931ab6e
commit 4bb8d67e68

@ -1,5 +1,5 @@
from gtts import gTTS from gtts import gTTS
import os
class GTTS: class GTTS:
def tts( def tts(
@ -9,5 +9,5 @@ class GTTS:
random_speaker=False, random_speaker=False,
censor=False, censor=False,
): ):
tts = gTTS(text=req_text, lang="en", slow=False) tts = gTTS(text=req_text, lang=os.getenv("POSTLANG") or "en", slow=False)
tts.save(f"{filename}") tts.save(f"{filename}")

Loading…
Cancel
Save