RTVIObserver: don't handle some frames direction
This commit is contained in:
@@ -1100,13 +1100,11 @@ class RTVIObserver(BaseObserver):
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
isinstance(frame, (UserStartedSpeakingFrame, UserStoppedSpeakingFrame))
|
isinstance(frame, (UserStartedSpeakingFrame, UserStoppedSpeakingFrame))
|
||||||
and (direction == FrameDirection.DOWNSTREAM)
|
|
||||||
and self._params.user_speaking_enabled
|
and self._params.user_speaking_enabled
|
||||||
):
|
):
|
||||||
await self._handle_interruptions(frame)
|
await self._handle_interruptions(frame)
|
||||||
elif (
|
elif (
|
||||||
isinstance(frame, (BotStartedSpeakingFrame, BotStoppedSpeakingFrame))
|
isinstance(frame, (BotStartedSpeakingFrame, BotStoppedSpeakingFrame))
|
||||||
and (direction == FrameDirection.UPSTREAM)
|
|
||||||
and self._params.bot_speaking_enabled
|
and self._params.bot_speaking_enabled
|
||||||
):
|
):
|
||||||
await self._handle_bot_speaking(frame)
|
await self._handle_bot_speaking(frame)
|
||||||
|
|||||||
Reference in New Issue
Block a user