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 3c4f270 commit ec02c88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions vocode/streaming/streaming_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def interrupt_current_filler_audio(self):

async def process(self, item: InterruptableAgentResponseEvent[FillerAudio]):
try:
self.conversation.logger.debug(f"Waiting for {self.name} to start")
filler_audio = item.payload
assert self.config is not None
filler_synthesis_result = filler_audio.create_synthesis_result()
Expand All @@ -216,6 +217,7 @@ async def process(self, item: InterruptableAgentResponseEvent[FillerAudio]):
self.config.silence_threshold_seconds
)
await asyncio.sleep(silence_threshold)
self.conversation.logger.debug(f"Finished waiting for {self.name} to start")
self.conversation.logger.debug(f"Sending {self.name} to output")
self.filler_audio_started_event = threading.Event()
await self.conversation.send_speech_to_output(
Expand Down
3 changes: 1 addition & 2 deletions vocode/streaming/transcriber/deepgram_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async def receiver(ws: WebSocketClientProtocol):
else:
buffer_avg_confidence = (
buffer_avg_confidence
+ confidence / (num_buffer_utterances)
+ confidence / num_buffer_utterances
) * (num_buffer_utterances / (num_buffer_utterances + 1))
num_buffer_utterances += 1
if speech_final:
Expand All @@ -262,7 +262,6 @@ async def receiver(ws: WebSocketClientProtocol):
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 ec02c88

Please sign in to comment.