Alibaba Lingxin Project

[中文]

1. Overview

This project is based on beken_genie. It replaces Agora RTC with the Alibaba LingXin voice-chat engine.

Provisioning, buttons, LEDs, dual-screen AVI, wake words and prompt tones stay the same as beken_genie. Hardware is still the AIDK AI toy board (dual SPI LCD GC9D01).

For hardware, keys, LEDs, provisioning and the mobile App, see Beken Genie AI Project

Project path: <source code>/projects/lingxin

2. Differences from beken_genie

  • Conversation stack is LingXin_AI_IoT_VoiceChatEngine, enabled by CONFIG_LINGXIN_AI_EN=y.

  • After Wi-Fi is ready, the Lingxin smart-config adapter calls Beken activate_agent to fetch appId / appKey / sn / agentCode, then voice_chat_init().

  • Display is still dual-screen AVI (CONFIG_DUAL_SCREEN_AVI_PLAY=y), not single-screen subtitles.

  • Default audio is PCM 16 kHz with G722, AEC and KWS.

3. Key configuration

Kconfig

CPU

Format

Value

CONFIG_LINGXIN_AI_EN

CPU0

bool

y

CONFIG_BK_SMART_CONFIG

CPU0

bool

y

CONFIG_DUAL_SCREEN_AVI_PLAY

CPU0 & CPU1

bool

y

CONFIG_WEBSOCKET

CPU0

bool

y

Source pointers:

  • Provisioning / auth: projects/common_components/bk_smart_config/src/adapter/lingxin/

  • Session start: projects/common_components/network_transfer/lingxin_wss/lingxin_wss_main.c

  • Engine: bk_avdk/components/bk_thirdparty/LingXin_AI_IoT_VoiceChatEngine

4. Authentication

Default (CONFIG_ENABLE_LINGXIN_COSTOM_AUTH off):

  1. Device UID is used as the channel name and sent during BLE provisioning.

  2. After the station is up, HTTP POST activate_agent returns app_id, app_key, sn, agent_code.

  3. Those four getters are registered on VoiceChatInitProps before voice_chat_init().

For a private Lingxin tenant, enable CONFIG_ENABLE_LINGXIN_COSTOM_AUTH and supply appId / appKey / SN / agentCode in the adapter. Beken activate_agent is then skipped.

5. Build and flash

  • Download AIDK

  • From the SDK root: make bk7258 PROJECT=lingxin

  • Firmware: <source code>/build/lingxin/bk7258/all-app.bin

  • Flashing and SD-NAND resources (eye AVI, etc.) follow beken_genie section 3.5.

6. Q&A

Q: What does a customer need besides the Genie App flow?

A: The App provisioning UI can stay. The cloud path is Lingxin, so a valid appId / appKey / agentCode is required (issued by the Beken server by default).

Q: Can it build without LCDs?

A: Yes, but dual-screen AVI is on by default. Turn off CONFIG_DUAL_SCREEN_AVI_PLAY in menuconfig and re-check CPU1 memory.