Deadmon commited on
Commit
aba151b
·
verified ·
1 Parent(s): f336a0c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -5,7 +5,7 @@ import time
5
  import logging
6
  from pipecat.frames.frames import (
7
  TextFrame, UserStartedSpeakingFrame, UserStoppedSpeakingFrame,
8
- TTSStartedFrame, TTSEndFrame
9
  )
10
  from pipecat.pipeline.pipeline import Pipeline
11
  from pipecat.pipeline.runner import PipelineRunner
@@ -64,7 +64,7 @@ class SilenceAndCallLogicProcessor(FrameProcessor):
64
  self._reset_activity_timer()
65
  if isinstance(frame, TTSStartedFrame) and direction == FrameDirection.DOWNSTREAM:
66
  self._bot_is_speaking = True
67
- elif isinstance(frame, TTSEndFrame) and direction == FrameDirection.DOWNSTREAM:
68
  self._bot_is_speaking = False
69
  self.last_activity_ts = time.time()
70
  await self.push_frame(frame, direction)
 
5
  import logging
6
  from pipecat.frames.frames import (
7
  TextFrame, UserStartedSpeakingFrame, UserStoppedSpeakingFrame,
8
+ TTSStartedFrame, TTSStoppedFrame
9
  )
10
  from pipecat.pipeline.pipeline import Pipeline
11
  from pipecat.pipeline.runner import PipelineRunner
 
64
  self._reset_activity_timer()
65
  if isinstance(frame, TTSStartedFrame) and direction == FrameDirection.DOWNSTREAM:
66
  self._bot_is_speaking = True
67
+ elif isinstance(frame, TTSStoppedFrame) and direction == FrameDirection.DOWNSTREAM:
68
  self._bot_is_speaking = False
69
  self.last_activity_ts = time.time()
70
  await self.push_frame(frame, direction)