This commit is contained in:
2024-09-20 16:08:43 +02:00
parent 0278dc3a49
commit d027a961b7
+3
View File
@@ -110,6 +110,7 @@ class SRBuffer(voice_recv.AudioSink):
return False
def write(self, user, data) -> None:
logger.info("DAta write")
if user:
self.wavewriter[str(user.id)][0].writeframes(data.pcm)
self.wavewriter[str(user.id)][1] = time.time_ns() #time from last write
@@ -193,6 +194,8 @@ class Transcriber(commands.Cog):
self.comm_queue.put(stop_token)
await ctx.voice_client.disconnect()
#this needs to be async and transcript fun awaited
def transcribe_output_queue(queue):
logger.info("Transcript worker start")
config = aai.TranscriptionConfig(speaker_labels=True, language_code="pl")