JamesQAQ / Kyu-Discord-Bot

Try implementing a discord bot which reacts with some actions.
MIT License
0 stars 0 forks source link

The connection will be terminated if it waits for long text audio file for a while #1

Open JamesQAQ opened 11 months ago

JamesQAQ commented 11 months ago

The long text audio file was successfully generated by web_inference.py, but the connection of discord(on_message) was terminated with some exceptions. Then the voice channel connection seems to be disconnected so the following say / say_jp commands won't be processed.

A possible way to fix is that: when on_message is called, it just create a async task to a task queue instead of starting generating the audio file, and also have another worker to process the tasks in the newly added task queue to process tasks.

JamesQAQ commented 11 months ago

I couldn't reproduce it successfully, it sometimes works and sometimes doesn't work.