Commit Graph

3 Commits

Author SHA1 Message Date
hailin eda88f83f3 fix: send system idle instead of tts stop to avoid Speaking→Listening race
Root cause: tts stop triggers Speaking→Listening, which calls
SendStartListening in HandleStateChangedEvent. idle arrives too late
and gets overridden. Fix: skip tts stop when idle is needed, go
Speaking→Idle directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 09:30:55 -07:00
hailin 16d8a744ac feat: system idle command - return ESP32 to wake-word state on error
Firmware: add "idle" system command handler in application.cc
Server: antaf.py sets should_idle on connection error
        connection.py checks should_idle, sets send_idle_after_tts
        sendAudioHandle.py sends {"type":"system","command":"idle"}
        after TTS playback completes

Flow: antaf bridge unavailable → play error message → tts stop →
      send system idle → ESP32 returns to wake-word detection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:44:55 -07:00
hailin 742389e965 add backend code 2026-04-05 19:01:15 +00:00