|
|
@@ -436,6 +436,12 @@ class IntentDispatcherService(IService):
|
|
|
|
|
|
pinfo(f"Follow-up erwartet für Satellite: {followup_info['satellite_id']}")
|
|
|
await self._application.events.trigger("followup_expected", followup_event)
|
|
|
+
|
|
|
+ # FollowUpRequest an Satellite senden (Server→Client Modus)
|
|
|
+ await self._send_follow_up_request(
|
|
|
+ followup_info["satellite_id"],
|
|
|
+ followup_info["session_id"],
|
|
|
+ )
|
|
|
else:
|
|
|
# Kein Follow-up → ConversationEnd senden
|
|
|
if satellite_id:
|
|
|
@@ -462,6 +468,29 @@ class IntentDispatcherService(IService):
|
|
|
except Exception as e:
|
|
|
perror(f"Fehler beim Senden von ConversationEnd: {e}")
|
|
|
|
|
|
+ async def _send_follow_up_request(self, satellite_id: str, session_id: str = "") -> None:
|
|
|
+ """Sendet FollowUpRequest an den Satellite → Client wechselt in Hoer-Modus."""
|
|
|
+ satellites = getattr(self._application, "satellites", None)
|
|
|
+ if satellites is None:
|
|
|
+ return
|
|
|
+
|
|
|
+ satellite = satellites.get(satellite_id)
|
|
|
+ if satellite is None or not satellite.is_connected:
|
|
|
+ pdebug(f"Satellite {satellite_id} nicht verfuegbar fuer FollowUpRequest")
|
|
|
+ return
|
|
|
+
|
|
|
+ try:
|
|
|
+ from trixy_core.network.cmd.wakeword import FollowUpRequest
|
|
|
+ cmd = FollowUpRequest(
|
|
|
+ session_id=session_id,
|
|
|
+ question="", # Keine explizite Rueckfrage — Konversation geht einfach weiter
|
|
|
+ timeout_seconds=60.0,
|
|
|
+ )
|
|
|
+ await satellite.send_command(cmd)
|
|
|
+ pdebug(f"FollowUpRequest gesendet an {satellite_id}")
|
|
|
+ except Exception as e:
|
|
|
+ perror(f"Fehler beim Senden von FollowUpRequest: {e}")
|
|
|
+
|
|
|
async def _send_tts_to_satellite(self, satellite_id: str, audio_data_hex: str) -> None:
|
|
|
"""Sendet TTS-Audio an den Satellite."""
|
|
|
try:
|