Skip to content

Add face-triggered conversation wake#1

Merged
yuru-sha merged 3 commits into
custom/mainfrom
feature/camera-face-wake
May 20, 2026
Merged

Add face-triggered conversation wake#1
yuru-sha merged 3 commits into
custom/mainfrom
feature/camera-face-wake

Conversation

@yuru-sha
Copy link
Copy Markdown
Owner

@yuru-sha yuru-sha commented May 19, 2026

日本語

概要

  • CoreS3 カメラの顔検出で AI.AGENT の会話を開始できるようにしました。
  • 画面中央付近に顔がある場合だけ会話を ON にする正面判定を追加しました。
  • 電源ボタン短押しで顔認識の ON/OFF を切り替えられるようにしました。
  • 顔認識を OFF にしたとき会話中なら、会話も同時に停止するようにしました。
  • 顔認識 ON/OFF 状態を NVS に保存し、再起動後も維持するようにしました。
  • StackChan アバター表示で通知吹き出しを表示できるようにしました。
  • 顔検出モデル用パーティション、ESP-DL / human_face_detect 依存関係、設定項目を追加しました。
  • xiaozhi-esp32 patch を更新し、会話用 AFE タスクの起動と音声キュー詰まりによる無反応を改善しました。
  • 顔検出タスクのスタック配置を修正し、AI.AGENT 起動時の再起動を解消しました。
  • AGENTS.md を追加しました。

確認内容

  • cd firmware && source ~/esp-idf/export.sh && idf.py build
  • cd firmware && source ~/esp-idf/export.sh && idf.py -p /dev/cu.usbmodem101 flash
  • 実機で AI.AGENT 起動時に再起動しないことを確認しました。
  • 実機で顔検出から会話が開始し、音声認識と応答が行われることを確認しました。
  • 実機で電源ボタン短押しにより Face wake ON / Face wake OFF の吹き出しが表示されることを確認しました。
  • monitor で顔認識 ON/OFF のログ、および会話中に OFF へ切り替えた際 speaking -> idle へ遷移することを確認しました。
  • firmware/patches/xiaozhi-esp32.patch78/xiaozhi-esp32v2.2.4 に適用できることを確認しました。

English

Summary

  • Added a CoreS3 camera face-detection service that can start AI.AGENT conversation.
  • Added a centered-face check so conversation starts only when a face is near the center of the camera frame.
  • Added a short power-button press toggle for face wake ON/OFF.
  • Stopped the active conversation when face wake is turned OFF during conversation.
  • Persisted the face wake ON/OFF state in NVS across reboots.
  • Implemented notification speech bubbles for the StackChan avatar display.
  • Added the face detection model partition, ESP-DL / human_face_detect dependencies, and related configuration options.
  • Updated the xiaozhi-esp32 patch to make the conversation AFE task start reliably and avoid microphone input stalls when audio queues back up.
  • Fixed the face wake task stack placement to prevent rebooting when AI.AGENT starts.
  • Added AGENTS.md contributor guidelines.

Verification

  • cd firmware && source ~/esp-idf/export.sh && idf.py build
  • cd firmware && source ~/esp-idf/export.sh && idf.py -p /dev/cu.usbmodem101 flash
  • Confirmed on hardware that AI.AGENT no longer reboots on startup.
  • Confirmed on hardware that face detection starts conversation and audio recognition/response works.
  • Confirmed on hardware that short power-button presses show Face wake ON / Face wake OFF notification bubbles.
  • Confirmed in monitor logs that face wake toggles ON/OFF and that turning it OFF during conversation transitions from speaking -> idle.
  • Confirmed firmware/patches/xiaozhi-esp32.patch applies cleanly to 78/xiaozhi-esp32 v2.2.4.

@yuru-sha yuru-sha force-pushed the feature/camera-face-wake branch from 9d9baf8 to 51ad367 Compare May 19, 2026 05:23
@yuru-sha yuru-sha changed the base branch from main to custom/main May 20, 2026 13:21
@yuru-sha yuru-sha merged commit 7d386d6 into custom/main May 20, 2026
@yuru-sha yuru-sha deleted the feature/camera-face-wake branch May 20, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant