Detect wake word model from index.json #1211
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This pull request introduces several improvements and refactoring to the build system, audio service initialization, and board configurations, with a focus on simplifying wake word selection, improving maintainability, and updating default configurations. The most significant changes are grouped below:
Build System Improvements and Refactoring
find_component_by_patternto dynamically locate components by pattern, replacing repeated code blocks for finding components such asesp_emote_gfx,espressif__esp-sr, andxiaozhi-fontsinmain/CMakeLists.txt. This reduces redundancy and improves maintainability. [1] [2] [3]2.0.1to2.0.2inCMakeLists.txt.Wake Word and Audio Service Refactoring
audio_service.ccto choose the appropriate wake word engine at runtime based on the platform and available models, instead of compile-time macros. This enables more flexible and correct wake word detection on different hardware. [1] [2] [3] [4] [5] [6]main/CMakeLists.txtto match the new runtime selection approach.Board Configuration and Documentation Updates
config.jsonfiles and corresponding documentation, relying on improved defaults and reducing user configuration burden. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]partitions/v2/4m.csvinsdkconfig.defaults.esp32.Font and Board Defaults
font_puhui_basic_14_1instead offont_puhui_14_1for improved consistency. [1] [2]Other Minor Improvements