mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
tesst
This commit is contained in:
@@ -197,7 +197,7 @@ class Transcriber(commands.Cog):
|
||||
|
||||
async def transcribe_output_queue(self):
|
||||
logger.info("Transcript worker start")
|
||||
config = aai.TranscriptionConfig(speaker_labels=True, language_code="pl")
|
||||
config = aai.TranscriptionConfig(language_code="pl")
|
||||
transcriber = aai.Transcriber()
|
||||
logger.info("Transcriber queue id: %s",id(self.comm_queue))
|
||||
|
||||
@@ -210,12 +210,14 @@ class Transcriber(commands.Cog):
|
||||
break
|
||||
elif "send_file" in item.type:
|
||||
logger.info("Sending file for transcription")
|
||||
transcript = ""
|
||||
transcript = None
|
||||
for iter in item.data:
|
||||
transcript = await transcriber.transcribe(iter, config=config)
|
||||
logger.info("Data sent")
|
||||
for utterance in transcript.utterances:
|
||||
logger.info("%s : %s", item.user, utterance.text)
|
||||
logger.info("Iter %s",iter)
|
||||
transcript = transcriber.transcribe(iter, config=config)
|
||||
logger.info("Data sent")
|
||||
if transcript.error:
|
||||
logger.error(transcript.error)
|
||||
raise AssertionError
|
||||
elif "user_cleanup" in item.type:
|
||||
logger.info("User %s disconnected - cleanup action")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user