This commit is contained in:
2024-09-20 15:48:00 +02:00
parent 88926ec627
commit 4184cbb687
+5 -2
View File
@@ -154,6 +154,7 @@ class Transcriber(commands.Cog):
logger.info("Connected")
vc = await ctx.author.voice.channel.connect(cls=voice_recv.VoiceRecvClient)
logger.info(self.bot.voice_clients)
self.check_data.start()
self.worker.start()
vc.listen(self.wsink)
@@ -199,13 +200,15 @@ class Transcriber(commands.Cog):
@commands.command(name="stop_transcribe")
async def stop(self, ctx):
self.check_data.stop()
self.worker.stop()
self.comm_queue.put("STOP")
await ctx.voice_client.disconnect()
def transcribe_output_queue(queue):
logger.info("Worker start")
while True:
queue.get()
item = queue.get()
if item == "STOP":
break
logger.info("PING")
async def setup(bot):