Merge pull request #2078 from RequieMa/patch-1

Change from voice_name to name in elevenlabs.py & add random_voice input in GTTS.py
pull/2087/head
Jason Cameron 1 year ago committed by GitHub
commit 4a1aec6110
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,7 +10,7 @@ class GTTS:
self.max_chars = 5000
self.voices = []
def run(self, text, filepath):
def run(self, text, filepath, random_voice=False):
tts = gTTS(
text=text,
lang=settings.config["reddit"]["thread"]["post_lang"] or "en",

@ -35,4 +35,4 @@ class elevenlabs:
def randomvoice(self):
if self.client is None:
self.initialize()
return random.choice(self.client.voices.get_all().voices).voice_name
return random.choice(self.client.voices.get_all().voices).name

Loading…
Cancel
Save