feat(voice): add on-device Miao Zhang Gui wake word

Add an optional local wake response prompt configuration. The prompt asset is intentionally not included yet.
This commit is contained in:
chenjintao
2026-08-10 16:54:42 +08:00
parent d9660164a6
commit e5c1564130
21 changed files with 2010 additions and 56 deletions
+38 -2
View File
@@ -31,8 +31,44 @@ fi
if rg -n "platform_multimodal_downstream_playback_event|PLATFORM_MULTIMODAL_DOWNSTREAM_PLAYBACK" components/platform/include/platform.h >/dev/null 2>&1; then
fail "platform facade must not duplicate domain-owned multimodal semantic events"
fi
if rg -n "esp-sr|esp_sr|esp_afe|afe_config|afe_sr|model_path\\.h|srmodels|CONFIG_SR_|SR_WN|MULTIMODAL_WAKE_WORD|wake_word|Wake word|Wake-word|wn9_" components main sdkconfig.defaults dependencies.lock >/dev/null 2>&1; then
fail "ESP-SR and wake-word code/dependencies must stay removed"
if rg -n "esp_afe_sr|afe_config_init|afe_config_check|esp_afe_handle_from_config|SR_WN|MULTIMODAL_WAKE_WORD|wake_word|Wake word|Wake-word|wn9_" \
components/platform/{include,internal,src} \
components/control_plane/{include,internal,src} \
components/app_composition/{include,internal,src} >/dev/null 2>&1 ||
rg -n 'model_path\\.h|esp_srmodel_|esp_mn_' components/domain/{include,internal,src} \
--glob '!domain_local_command.c' >/dev/null 2>&1; then
fail "Local speech models must stay domain-owned and WakeNet/full AFE SR must stay absent"
fi
if ! rg -n 'espressif/esp-sr: \^2\.4\.7' components/platform/idf_component.yml >/dev/null 2>&1 ||
! rg -n 'DOMAIN_LOCAL_COMMAND_MIAO_ZHANG_GUI' \
components/domain/include/domain.h \
components/domain/src/runtime/domain_local_command.c >/dev/null 2>&1 ||
! rg -n 'miao zhang gui' \
components/domain/src/runtime/domain_local_command.c >/dev/null 2>&1; then
fail "Local command detection must keep the ESP-SR dependency and 喵掌柜 domain contract"
fi
if ! rg -n 'TQ_LOCAL_WAKE_RESPONSE_PROMPT_ENABLE' \
main/Kconfig.projbuild \
components/control_plane/src/multimodal/control_plane_multimodal_local_wake.c >/dev/null 2>&1 ||
! rg -n '/littlefs/audio_prompts/local_wake_response\.opus' \
main/Kconfig.projbuild \
sdkconfig.defaults \
components/control_plane/src/multimodal/control_plane_multimodal_local_wake.c >/dev/null 2>&1; then
fail "Local wake response prompt must keep its disabled asset placeholder contract"
fi
if ! rg -n '#include "esp_afe_aec.h"' components/platform/src/multimodal/audio_pipeline.c >/dev/null 2>&1 ||
! rg -n 'afe_aec_create\(' components/platform/src/multimodal/audio_pipeline/audio_pipeline_codec_impl.c >/dev/null 2>&1 ||
! rg -n 'afe_aec_process\(' components/platform/src/multimodal/audio_pipeline/audio_pipeline_runtime_impl.c >/dev/null 2>&1; then
fail "Platform must own the synchronous ESP-SR AEC implementation"
fi
if rg -n 'esp_afe_aec\.h|afe_aec_process\(' \
components/domain/{include,internal,src} \
components/control_plane/{include,internal,src} \
components/app_composition/{include,internal,src} >/dev/null 2>&1; then
fail "AEC execution must remain a platform primitive"
fi
if ! rg -n '^CONFIG_MULTIMODAL_AUDIO_CODEC_CHANNELS=2\r?$' sdkconfig.defaults >/dev/null 2>&1; then
fail "ES8311 microphone and DAC reference capture requires two physical codec slots"
fi
if rg -n "platform_lcd_trigger_slot_animation|lcd_trigger_slot_animation" components/platform/include components/platform/internal components/platform/src/runtime >/dev/null 2>&1; then
fail "platform must expose LCD presentation primitives, not one-off expression APIs"