feat: AppState gains speaker pause fields and AWAITING_SPEAKERS status
This commit is contained in:
+6
-1
@@ -8,15 +8,20 @@ class Status(str, Enum):
|
||||
IDLE = "idle"
|
||||
RECORDING = "recording"
|
||||
PROCESSING = "processing"
|
||||
AWAITING_SPEAKERS = "awaiting_speakers"
|
||||
ERROR = "error"
|
||||
|
||||
|
||||
@dataclass
|
||||
class AppState:
|
||||
status: Status = Status.IDLE
|
||||
recording_user: str | None = None # which user triggered the current recording
|
||||
recording_user: str | None = None
|
||||
last_error: str | None = None
|
||||
_listeners: list[Callable] = field(default_factory=list, repr=False)
|
||||
# Diarization pipeline pause
|
||||
_speakers_event: asyncio.Event | None = None
|
||||
_pending_aligned_segments: list[tuple[str, str]] | None = None
|
||||
_speaker_names: dict[str, str] | None = None
|
||||
|
||||
def subscribe(self, callback: Callable):
|
||||
self._listeners.append(callback)
|
||||
|
||||
Reference in New Issue
Block a user