|
@@ -408,6 +408,7 @@ class IntentDispatcherService(IService):
|
|
|
audio_data_hex = event_data.get("audio_data", "")
|
|
audio_data_hex = event_data.get("audio_data", "")
|
|
|
request_id = event_data.get("request_id", "")
|
|
request_id = event_data.get("request_id", "")
|
|
|
session_id = event_data.get("session_id", "")
|
|
session_id = event_data.get("session_id", "")
|
|
|
|
|
+ duration_seconds = event_data.get("duration_seconds", 0)
|
|
|
|
|
|
|
|
# Audio an Satellite senden (falls satellite_id vorhanden)
|
|
# Audio an Satellite senden (falls satellite_id vorhanden)
|
|
|
if satellite_id and audio_data_hex:
|
|
if satellite_id and audio_data_hex:
|
|
@@ -441,6 +442,7 @@ class IntentDispatcherService(IService):
|
|
|
await self._send_follow_up_request(
|
|
await self._send_follow_up_request(
|
|
|
followup_info["satellite_id"],
|
|
followup_info["satellite_id"],
|
|
|
followup_info["session_id"],
|
|
followup_info["session_id"],
|
|
|
|
|
+ audio_duration=duration_seconds,
|
|
|
)
|
|
)
|
|
|
else:
|
|
else:
|
|
|
# Kein Follow-up → ConversationEnd senden
|
|
# Kein Follow-up → ConversationEnd senden
|
|
@@ -468,7 +470,9 @@ class IntentDispatcherService(IService):
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
perror(f"Fehler beim Senden von ConversationEnd: {e}")
|
|
perror(f"Fehler beim Senden von ConversationEnd: {e}")
|
|
|
|
|
|
|
|
- async def _send_follow_up_request(self, satellite_id: str, session_id: str = "") -> None:
|
|
|
|
|
|
|
+ async def _send_follow_up_request(
|
|
|
|
|
+ self, satellite_id: str, session_id: str = "", audio_duration: float = 0,
|
|
|
|
|
+ ) -> None:
|
|
|
"""Sendet FollowUpRequest an den Satellite → Client wechselt in Hoer-Modus."""
|
|
"""Sendet FollowUpRequest an den Satellite → Client wechselt in Hoer-Modus."""
|
|
|
satellites = getattr(self._application, "satellites", None)
|
|
satellites = getattr(self._application, "satellites", None)
|
|
|
if satellites is None:
|
|
if satellites is None:
|
|
@@ -485,6 +489,7 @@ class IntentDispatcherService(IService):
|
|
|
session_id=session_id,
|
|
session_id=session_id,
|
|
|
question="", # Keine explizite Rueckfrage — Konversation geht einfach weiter
|
|
question="", # Keine explizite Rueckfrage — Konversation geht einfach weiter
|
|
|
timeout_seconds=60.0,
|
|
timeout_seconds=60.0,
|
|
|
|
|
+ audio_duration=audio_duration,
|
|
|
)
|
|
)
|
|
|
await satellite.send_command(cmd)
|
|
await satellite.send_command(cmd)
|
|
|
pdebug(f"FollowUpRequest gesendet an {satellite_id}")
|
|
pdebug(f"FollowUpRequest gesendet an {satellite_id}")
|