fix: move VAD agent creation to RI communication agent

Previously, it was started in main, but it should use values negotiated by the RI communication agent.

ref: N25B-356
This commit is contained in:
Twirre Meulenbelt
2025-12-03 15:07:29 +01:00
parent c85753f834
commit 21e9d05d6e
6 changed files with 125 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ from control_backend.agents import BaseAgent
from control_backend.core.config import settings
from ..actuation.robot_speech_agent import RobotSpeechAgent
from ..perception import VADAgent
class RICommunicationAgent(BaseAgent):
@@ -185,6 +186,9 @@ class RICommunicationAgent(BaseAgent):
bind=bind,
)
await ri_commands_agent.start()
case "audio":
vad_agent = VADAgent(audio_in_address=addr, audio_in_bind=bind)
await vad_agent.start()
case _:
self.logger.warning("Unhandled negotiation id: %s", id)