diff --git a/relay.py b/relay.py index 9c8e201..cb8009e 100644 --- a/relay.py +++ b/relay.py @@ -184,11 +184,18 @@ class Relay: msg_type = msg.get("type") if msg_type == "hello": - # Respond with hello ack + # Respond with proper hello — must match xiaozhi protocol resp = { "type": "hello", - "session_id": "relay-session", + "version": 1, "transport": "websocket", + "session_id": "relay-session", + "audio_params": { + "format": "opus", + "sample_rate": ESP_SAMPLE_RATE, + "channels": 1, + "frame_duration": ESP_FRAME_MS, + }, } await self.ws.send(json.dumps(resp)) log.info(f"ESP32 hello: {msg.get('audio_params')}")