Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
robotaref committed Oct 22, 2023
1 parent 777f5bb commit deeb352
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions vocode/streaming/transcriber/deepgram_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,17 @@ async def receiver(ws: WebSocketClientProtocol):
+ confidence / (num_buffer_utterances)
) * (num_buffer_utterances / (num_buffer_utterances + 1))
num_buffer_utterances += 1

self.logger.debug(f"before speech_final")
if speech_final:
if (self.context_tracker is None) or self.context_tracker.is_part_of_context(buffer):
self.output_queue.put_nowait(
Transcription(
message=buffer,
confidence=buffer_avg_confidence,
is_final=True,
)
# if (self.context_tracker is None) or self.context_tracker.is_part_of_context(buffer):
self.output_queue.put_nowait(
Transcription(
message=buffer,
confidence=buffer_avg_confidence,
is_final=True,
)
)
self.logger.debug(f"after speech final, buffer: {buffer}")
buffer = ""
buffer_avg_confidence = 0
num_buffer_utterances = 1
Expand Down

0 comments on commit deeb352

Please sign in to comment.