ESP32向けカスタムウェイクワード
製品専用のウェイクワードは、オンラインまたは自前で学習し、実際のマイクで検証してから、ESP32-S3向けの小型INT8モデルとして出力します。
ESP32で動くモデル
デスクトップ用ONNXモデルがそのままESP32で動くわけではありません。マイコンではINT8 TFLite Micro、16 kHzモノラルPCM、ローカル特徴抽出を組み合わせるのが一般的です。まずはPSRAM搭載のESP32-S3で検証します。
オンライン学習と自前学習
オンライン学習は小規模チームの短時間の検証に向いています。自前学習はデータや難しいネガティブ例を制御できますが、学習、変換、評価の環境を自分で保守する必要があります。
実装の流れ
特徴的なフレーズを選び、最終マイクで録音し、ノイズ環境で再現率と誤起動を測定し、INT8 TFLiteモデルとheadをセットでESP-IDFに組み込みます。
サンプル
git clone https://github.com/voicute/onnx-wakeword.git
cd onnx-wakeword/esp32/examples/esp32s3_hmi_devkit
idf.py set-target esp32s3
idf.py buildESP32-S3で日本語カスタムウェイクワードを検証. The model, feature settings and output head must be validated together on the final microphone and enclosure.
Important: browser accuracy does not prove hardware accuracy. Measure recall and false triggers with the final board, distance and background audio.
Train and test a custom wake wordView the open-source inference engine and demo models →
ONNX / TFLite · Android · ESP32 · Web · Python · Home Assistant