This commit is contained in:
2024-09-20 17:25:31 +02:00
parent 66906c4486
commit 94fe448326
+3 -3
View File
@@ -205,16 +205,16 @@ class Transcriber(commands.Cog):
logger.info("waiting for tasks")
item = await self.comm_queue.get()
logger.info("Got %s", item)
if item.type == "STOP":
if "STOP" in item.type:
logger.info("Queue ended")
break
elif item.type == "send_file":
elif "send_file" in item.type:
transcript = ""
for iter in item.data:
transcript = transcriber.transcribe(iter, config=config)
for utterance in transcript.utterances:
logger.info("%s : %s", item.user, utterance.text)
elif item.type == "user_cleanup":
elif "user_cleanup" in item.type:
logger.info("User %s disconnected - cleanup action")
else:
logger.warn("Something went wrong with object %s", item)