mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
fix jimmy stupid fkin shit ass
This commit is contained in:
parent
eb4169d6af
commit
7cee95cd44
1 changed files with 2 additions and 2 deletions
|
@ -832,7 +832,7 @@ class OtherCog(commands.Cog):
|
||||||
|
|
||||||
async def callback(self, interaction: discord.Interaction):
|
async def callback(self, interaction: discord.Interaction):
|
||||||
def _convert(text: str) -> BytesIO():
|
def _convert(text: str) -> BytesIO():
|
||||||
target_fn = f"jimmy-tts-{ctx.user.id}-{ctx.interaction.id}.mp3"
|
target_fn = f"/tmp/jimmy-tts-{ctx.user.id}-{ctx.interaction.id}.mp3"
|
||||||
engine = pyttsx3.init()
|
engine = pyttsx3.init()
|
||||||
engine.setProperty("voice", "english-north")
|
engine.setProperty("voice", "english-north")
|
||||||
engine.setProperty("rate", 150)
|
engine.setProperty("rate", 150)
|
||||||
|
@ -854,7 +854,7 @@ class OtherCog(commands.Cog):
|
||||||
|
|
||||||
while should_loop():
|
while should_loop():
|
||||||
if os.path.exists(target_fn):
|
if os.path.exists(target_fn):
|
||||||
last_3_sizes.pop(-1)
|
last_3_sizes.pop(0)
|
||||||
last_3_sizes.append(os.stat(target_fn).st_size)
|
last_3_sizes.append(os.stat(target_fn).st_size)
|
||||||
sleep(3)
|
sleep(3)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue