processors(realtime-ai): add support for interrupting the bot

This commit is contained in:
Aleix Conchillo Flaqué
2024-07-19 22:33:46 -07:00
parent 6e00f31014
commit 82d539d174
5 changed files with 89 additions and 22 deletions

View File

@@ -268,6 +268,16 @@ class StopInterruptionFrame(SystemFrame):
pass
@dataclass
class BotInterruptionFrame(SystemFrame):
"""Emitted by when the bot should be interrupted. This will mainly cause the
same actions as if the user interrupted except that the
UserStartedSpeakingFrame and UserStoppedSpeakingFrame won't be generated.
"""
pass
@dataclass
class BotSpeakingFrame(SystemFrame):
"""Emitted by transport outputs while the bot is still speaking. This can be