Skip to content

Commit

Permalink
chore(edge-tts): clear logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 committed Apr 20, 2023
1 parent fcadd29 commit f92cda3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@
logger.info("检测到 mirai 配置,将启动 mirai 模式……")
from platforms.ariadne_bot import start_task
bots.append(loop.create_task(start_task()))
loop.run_until_complete(load_edge_tts_voices())
try:
logger.info("[Edge TTS] 读取 Edge TTS 可用音色列表……")
loop.run_until_complete(load_edge_tts_voices())
logger.info("[Edge TTS] 读取成功!")
except Exception as e:
logger.exception(e)
logger.error("[Edge TTS] 读取失败!")

loop.run_until_complete(asyncio.gather(*bots))
loop.run_forever()

1 change: 0 additions & 1 deletion utils/edge_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ async def load_edge_tts_voices():
"edge", el.get('ShortName', ''), el.get('Gender', None)
):
edge_tts_voices[tts_voice.alias] = tts_voice
logger.info(f"{len(edge_tts_voices)} edge tts voices loaded.")
return edge_tts_voices


Expand Down

0 comments on commit f92cda3

Please sign in to comment.