Voice Interaction Reference Implementation (Robot + PC)

Note

This section describes an open-source voice interaction reference implementation. Its source code ships with the SDK (extra/interaction-robot/, extra/interaction-pc/; versions follow the SDK package) and evolves independently of the SDK main repository.

In one sentence: a two-side voice interaction reference implementation built on SDK open interfaces (/aima/hal/audio/capture, /aima/hal/audio/playback, camera topics) — the robot side runs on the X2 dev compute unit, the PC side runs on a workstation, and the two cooperate over HTTP to complete the full loop of “wake-up → voiceprint gating → ASR → LLM → TTS → playback”.

Intended audience: secondary developers who want to build custom voice interaction on X2, or to study a complete voice-pipeline implementation (AEC / denoising / VAD / wake word / voiceprint / ASR / separation / TTS / knowledge base / VLM / LLM proxy).

Two-side architecture

        flowchart LR
    Mic[机器人麦克风] --> AEC[LocalVQE 回声消除]
    AEC --> NS[DFSMN 降噪]
    NS --> Gate[唤醒与语音门控]
    Gate -->|"HTTP"| PC_ASR[PC ASR / 分离 / 声纹]
    PC_ASR --> LLM[LLM 对话]
    LLM --> TTS[PC TTS]
    TTS -->|"HTTP"| Speaker[机器人播放]
    Camera[机器人相机] --> Bridge[相机桥接]
    Bridge -->|"HTTP"| Vision[PC 视觉服务]
    Vision --> LLM
    

Division of work:

Side

Runs on

Responsibilities

Code location

Robot side

X2 dev compute unit (ARM64, Python 3.10, ROS 2 Humble)

Microphone pipeline (AEC / denoising / VAD / wake word / voiceprint gating), interaction orchestration, audio playback, camera bridging, data persistence

extra/interaction-robot/

PC side

Ubuntu 22.04 workstation (GPU, main pipeline models total about 23.65 GB)

ASR / speaker separation / voiceprint / TTS / knowledge base / vision / LLM proxy / Dashboard (7+1 HTTP services)

extra/interaction-pc/

Which one to use

  • To run the full voice interaction (both robot and PC) → prepare both sides following the robot side deployment steps

  • To study one side only (e.g. the robot-side audio front-end or the PC-side TTS voice management) → read the corresponding side page and the in-repo docs as needed

  • If voice interaction is not needed and you only want to reference the audio topic usage (/aima/hal/audio/capture / /aima/hal/audio/playback) → read the audio access part of robot/agent/interaction_agent.py in the robot-side repo

Warning

Voice pipeline mutual exclusion: this reference implementation captures the microphone from /aima/hal/audio/capture and publishes playback to /aima/hal/audio/playback — the same pair of audio topics used by the firmware voice interaction system. Stop the firmware voice interaction system before running this reference implementation; otherwise the two sides interfere with each other’s capture and playback. Likewise, stop this reference implementation before restoring the firmware voice interaction system.

Obtaining the code

The code ships with the SDK (version follows the SDK package). If extra/interaction-robot/ or extra/interaction-pc/ is empty or missing, run the following from the SDK repository root:

git submodule update --init --recursive extra/interaction-robot extra/interaction-pc

Section navigation