mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
i hate tts now
This commit is contained in:
parent
74b6b7026b
commit
802d5b23e7
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,6 @@ import os
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
|
||||||
import textwrap
|
import textwrap
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
@ -13,7 +12,7 @@ import dns.resolver
|
||||||
from dns import asyncresolver
|
from dns import asyncresolver
|
||||||
import aiofiles
|
import aiofiles
|
||||||
import pyttsx3
|
import pyttsx3
|
||||||
from time import time, time_ns
|
from time import time, time_ns, sleep
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
from typing import Tuple, Optional, Dict
|
from typing import Tuple, Optional, Dict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -839,7 +838,7 @@ class OtherCog(commands.Cog):
|
||||||
engine.save_to_file(text, target_fn)
|
engine.save_to_file(text, target_fn)
|
||||||
engine.runAndWait()
|
engine.runAndWait()
|
||||||
while not os.path.exists(target_fn):
|
while not os.path.exists(target_fn):
|
||||||
time.sleep(0.5)
|
time_sleep(0.5)
|
||||||
with open(target_fn, "rb") as f:
|
with open(target_fn, "rb") as f:
|
||||||
_io.write(f.read())
|
_io.write(f.read())
|
||||||
os.remove(target_fn)
|
os.remove(target_fn)
|
||||||
|
|
Loading…
Reference in a new issue