fix: don't send tts start on wake word - it stops ESP32 recording
ESP32 stops sending audio when it receives tts start because it thinks the server is speaking. Just acknowledge detect silently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f479f156b9
commit
b39dab2536
9
relay.py
9
relay.py
|
|
@ -194,16 +194,11 @@ class Relay:
|
|||
|
||||
elif msg_type == "listen":
|
||||
state = msg.get("state")
|
||||
log.debug(f"ESP32 listen: {state}")
|
||||
log.info(f"ESP32 listen: {state}")
|
||||
if state == "detect":
|
||||
# Wake word detected — acknowledge
|
||||
text = msg.get("text", "")
|
||||
log.info(f"Wake word: {text}")
|
||||
# Send TTS start to keep ESP32 happy
|
||||
await self.ws.send(json.dumps({
|
||||
"type": "tts", "state": "start",
|
||||
"session_id": msg.get("session_id", "")
|
||||
}))
|
||||
# Don't send tts start — let ESP32 continue recording
|
||||
|
||||
elif msg_type == "abort":
|
||||
log.info("ESP32 abort")
|
||||
|
|
|
|||
Loading…
Reference in New Issue