From 0da2f2df2681901801e24acf67c91f5f697968a7 Mon Sep 17 00:00:00 2001 From: Bobloy Date: Wed, 16 May 2018 08:57:32 -0400 Subject: [PATCH] getvalue and default language --- tts/tts.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tts/tts.py b/tts/tts.py index 49bf494..dcae0be 100644 --- a/tts/tts.py +++ b/tts/tts.py @@ -28,8 +28,7 @@ class TTS: Extra information goes here """ - tts = gTTS(text) mp3_fp = io.BytesIO() + tts = gTTS(text, 'en') tts.write_to_fp(mp3_fp) - - await ctx.send("Here's your text", file=discord.File(mp3_fp, "text.mp3")) + await ctx.send(file=discord.File(mp3_fp.getvalue(), "text.mp3"))