feat(idf): ESP-NOW scenario hot-load + IDF migration #1
Reference in New Issue
Block a user
Delete Branch "feat/idf-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Automated PR (Claude). Builds green under ESP-IDF 5.4.4.
Slice 6 of the IDF migration: bring up the Espressif AFE + WakeNet9 pipeline on top of the existing slice-5 I2S capture stub. The active wake word is the standard wn9_hiesp ("Hi ESP") model — custom "Professeur Zacus" needs an Espressif training round-trip and is tracked under P4 of the voice spec. The capture task feeds AFE, fetches results, fires a user callback on WAKENET_DETECTED and auto-transitions to VOICE_STATE_LISTENING. If esp-sr fails to init (model partition missing, PSRAM exhausted, AFE alloc OOM) the pipeline falls back to the slice-5 stub so the rest of the firmware still boots. - main/idf_component.yml: managed dep on espressif/esp-sr ~2.0 - partitions.csv: new 1 MB SPIFFS "model" partition for srmodels.bin - sdkconfig.defaults: enable wn9_hiesp; disable MultiNet (off-device) - voice_pipeline.h: new wake callback API + enable_wake_word config - main.c: enable wake word, log + restart capture from callback Built green on ESP-IDF 5.4 with esp-sr 2.0.5. App size 1.27 MB (18% free in 1.5 MB factory partition); srmodels.bin 284 KB (72% free in 1 MB model partition). No partition table grow needed this slice.Slice 9b: parse {type:speak_start,sample_rate,format} and {type:speak_end,duration_ms,backend,latency_ms} from voice-bridge, route binary frames to voice_pipeline_play_chunk during the speak window. State machine transitions LISTENING -> SPEAKING -> IDLE drive the mute gate added in slice 9. End-to-end TTS playback now works: ESP32 wake -> stream -> /voice/ws -> whisper -> intent -> F5-TTS PCM stream -> I2S out.