This topic walks you through how to configure the tuyaos_demo_wukong_ai project, covering board type selection, feature switches, AI mode, UI, and audio.
make app_menuconfig APP_NAME=tuyaos_demo_wukong_ai
In the Tuya Wind IDE, you can access this by navigating through the menu or by right-clicking the project and selecting Configuration.
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ 1. Enter menuconfig │ ──► │ 2. Select/modify config │ ──► │ 3. Save and exit │
└─────────────────┘ └──────────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ 6. Build firmware │ ◄── │ 5. Build project │ ◄── │ 4. Generate config file │
└─────────────────┘ └──────────────────────┘ └─────────────────┘
After modifying the configuration, you must run the following command to generate tuya_app_config.h. Otherwise, the configuration changes will not take effect.
make app_config APP_NAME=tuyaos_demo_wukong_ai
| Requirement | Item | Description |
|---|---|---|
| No screen, voice-only | Select the board type, and then turn off ENABLE_TUYA_UI |
No LVGL, no display, saves resources |
| Camera required | Select T5AI_BOARD/EYES/ROBOT/DESKTOP, and then turn on ENABLE_TUYA_CAMERA |
Supports P2P video, multimodal AI |
| P2P video call required | Turn on ENABLE_TUYA_CAMERA, and then turn on ENABLE_AI_MODE_P2P |
Point-to-point audio/video communication |
| Cellular network (4G, etc.) required | Turn on ENABLE_CELLULAR_DONGLE |
USB cellular module |
| File system (resource storage) required | Turn on ENABLE_TUYA_UI, and then turn on TUYA_FILE_SYSTEM |
LittleFS supports SD card or SPI flash |
After a board type is selected, certain AI modes are automatically enabled (determined by the board’s select statements). The table below shows the default enabled modes for each board type:
| Board type | HOLD | ONESHOT | WAKEUP | FREE | TRANSLATE | P2P |
|---|---|---|---|---|---|---|
| T5AI_BOARD / EVB / EYES / ROBOT / DESKTOP | ✓ | ✓ | ✓ | ✓ | - | Requires camera |
| WUKONG_BOARD_UBUNTU | ✓ | - | - | - | - | - |
TUYA_AI_CHAT_DEFAULT_MODEThe conversation mode entered by default upon power-on (values 0 to 5 correspond to hold, oneshot, wakeup, free, translate, and p2p, respectively).
In build/APPconfig, under the config block for the corresponding board type, add or remove select ENABLE_AI_MODE_xxx.
For example, to add the wakeup mode for a board type, add select ENABLE_AI_MODE_WAKEUP. To remove a mode, delete the specified select line. For P2P mode, you must first turn on ENABLE_TUYA_CAMERA, and then turn on ENABLE_AI_MODE_P2P in its sub-options. After modifications, run make app_config to generate the configuration.
Find TUYA_AI_CHAT_DEFAULT_MODE in menuconfig, change its value to the desired mode (0 – 5), save, and then run make app_config to generate the configuration.
The selected mode must be one that has already been selected for the current board type. Otherwise, the system will fall back to another enabled mode. Users can also switch between modes via the UI at runtime, and the switched mode will be saved and used preferentially on the next power-on. For more information, see Default conversation mode.
T5AI_BOARD, T5AI_BOARD_EYES, T5AI_BOARD_ROBOT, and T5AI_BOARD_DESKTOP.ENABLE_AI_MODE_P2P is used to enable P2P video call mode.| Sub-configuration | Description |
|---|---|
| TUYA_CPU_ARCH_SMP | CPU multi-core architecture. Enables multi-type LCD, touch, and LVGL ARM2D acceleration. |
| TUYA_LVGL_VERSION | LVGL version, 8 or 9. |
| TUYA_LINGDONG_GUI | Lingdong GUI components. |
| TUYA_IMG_DIRECT_FLUSH | Direct image flush to screen (depends on TUYA_CPU_ARCH_SMP). |
| TUYA_FILE_SYSTEM | File system. Supports SD card or SPI flash. |
| FILE_SYSTEM_LFS_SD | LittleFS uses SD card. |
| FILE_SYSTEM_LFS_SPI_FLASH | LittleFS uses SPI flash. |
| Value | Mode | Description |
|---|---|---|
| 0 | hold | Press and hold to trigger |
| 1 | oneshot | Press the specified button once |
| 2 | wakeup | Keyword wake-up |
| 3 | free | Free conversation |
| 4 | translate | Translation mode |
| 5 | p2p | P2P mode (requires camera to be enabled) |
If the current default mode does not meet your requirements, you can modify it in the following ways:
Use menuconfig (Recommended):
make app_menuconfig APP_NAME=tuyaos_demo_wukong_ai.TUYA_AI_CHAT_DEFAULT_MODE and change its value to the desired mode (0 – 5).make app_config APP_NAME=tuyaos_demo_wukong_ai to generate the configuration.Switch during runtime:
TUYA_AI_CHAT_DEFAULT_MODE will be used instead.Constraints:
WUKONG_BOARD_UBUNTU only has the HOLD mode enabled. Even if the default mode is set to 3 (free conversation), the system will actually use the HOLD mode.| Item | Description | Default |
|---|---|---|
| AI_PLAYER_DECODER_OPUS_ENABLE | Enable raw OPUS decoding | y |
| AI_PLAYER_DECODER_OPUS_FRAME_SIZE | OPUS frame length (ms), ranging from 10 to 60 | 40 |
| AI_PLAYER_DECODER_OPUS_KBPS | OPUS bitrate (kbps), ranging from 16 to 128 | 16 |
| AI_PLAYER_DECODER_OGGOPUS_ENABLE | Enable OGG-OPUS container decoding | y |
BOARD_TYPE = T5AI_BOARD (or EVB)
ENABLE_TUYA_UI = n
ENABLE_TUYA_CAMERA = n
BOARD_TYPE = T5AI_BOARD
ENABLE_TUYA_UI = y
ENABLE_TUYA_CAMERA = y
ENABLE_AI_MODE_P2P = n (Enable if needed)
BOARD_TYPE = WUKONG_BOARD_UBUNTU
BOARD_TYPE = T5AI_BOARD_EVB
ENABLE_TUYA_UI = y
include/tuya_app_config.h or build/tuya_app.config.local.mk selects board-level implementations under src/boards/xxx/ based on configuration options like CONFIG_T5AI_BOARD.make app_config before rebuilding.Add a new config within the choice block in build/APPconfig, and establish a select dependency.
config MY_CUSTOM_BOARD
bool "MY_CUSTOM_BOARD"
select TUYA_MODULE_T5
select USING_BOARD_AUDIO_INPUT
select USING_BOARD_AUDIO_OUTPUT
select ENABLE_AI_MODE_HOLD
select ENABLE_AI_MODE_ONESHOT
select ENABLE_AI_MODE_WAKEUP
select ENABLE_AI_MODE_FREE
USING_BOARD_AUDIO_INPUT/OUTPUT for onboard microphone/speaker, and USING_UART_AUDIO_INPUT/OUTPUT for UART external connection.select LCD_SPI_DISPLAY for SPI screens, and add select SPI0_REMAP_PIN if pin remapping is required.select ENABLE_AI_MODE_xxx as needed.If a new board type supports the camera, add the new board type to the if condition for ENABLE_TUYA_CAMERA:
if (T5AI_BOARD || T5AI_BOARD_EYES || ... || MY_CUSTOM_BOARD)
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback