introduce StartInterruptionFrame and StopInterruptionFrame

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-17 11:07:12 -07:00
parent f62fe059b1
commit 0bef44c2ff
3 changed files with 38 additions and 9 deletions

View File

@@ -216,6 +216,28 @@ class StopTaskFrame(SystemFrame):
pass
@dataclass
class StartInterruptionFrame(SystemFrame):
"""Emitted by VAD to indicate that a user has started speaking (i.e. is
interruption). This is similar to UserStartedSpeakingFrame except that it
should be pushed concurrently with other frames (so the order is not
guaranteed).
"""
pass
@dataclass
class StopInterruptionFrame(SystemFrame):
"""Emitted by VAD to indicate that a user has stopped speaking (i.e. no more
interruptions). This is similar to UserStoppedSpeakingFrame except that it
should be pushed concurrently with other frames (so the order is not
guaranteed).
"""
pass
#
# Control frames
#