| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- # -*- coding: utf-8 -*-
- """
- Recording-bezogene Netzwerk-Befehle.
- """
- from dataclasses import dataclass
- from trixy_core.network.cmd.base import CommandMessage
- @dataclass
- class RecordingStart(CommandMessage):
- """
- Aufnahme starten.
- Wird vom Server zum Satellite gesendet, um die Audio-Aufnahme zu starten.
- """
- conversation_id: str = ""
- max_duration_seconds: float = 60.0
- silence_timeout_seconds: float = 3.0
- @dataclass
- class RecordingStop(CommandMessage):
- """
- Aufnahme stoppen.
- Wird vom Server zum Satellite gesendet, um die Aufnahme zu beenden.
- """
- conversation_id: str = ""
- reason: str = "" # timeout, command, error
- @dataclass
- class RecordingDone(CommandMessage):
- """
- Aufnahme abgeschlossen.
- Wird vom Satellite zum Server gesendet, wenn die Aufnahme beendet wurde.
- """
- conversation_id: str = ""
- duration_seconds: float = 0.0
- total_samples: int = 0
- ended_by: str = "" # silence, timeout, user, error
- @dataclass
- class SatelliteRecordStart(CommandMessage):
- """Server-gesteuerte Aufnahme starten (Server → Satellite)."""
- recording_id: str = ""
- timeout_seconds: float = 300.0
- @dataclass
- class SatelliteRecordStop(CommandMessage):
- """Server-gesteuerte Aufnahme stoppen (Server → Satellite)."""
- recording_id: str = ""
- reason: str = "" # "manual", "timeout"
- @dataclass
- class SatelliteRecordStopped(CommandMessage):
- """Bestätigung: Aufnahme beendet (Satellite → Server)."""
- recording_id: str = ""
- reason: str = "" # "manual", "wakeword", "timeout"
- duration_seconds: float = 0.0
|