Welcome to ROSMASTER A1 PRO repository
3.OpenClaw Voice Dialogue Interaction
OpenClaw Voice Dialogue Interaction
1. Course Content
Course Overview
OpenClaw Voice Dialogue Interaction is a full-duplex natural language voice interaction solution designed specifically for the A1 Pro Ackermann embodied intelligence robot. By bridging local high-performance voice processing capabilities (microphone array hardware wake-up, Silero-VAD voice activity detection, real-time speech recognition ASR, speech synthesis TTS) with the OpenClaw embodied large model brain and the ROS 2 MCP (Model Context Protocol) chassis/arm control framework, users can engage in intelligent chat, common sense Q&A, and drive robot chassis movement and arm spatial grasping operations through natural voice dialogue - without the need for keyboard or web text input.
Learning Objectives
Understand the system architecture of the OpenClaw voice interaction loop and the collaboration mechanism of each node
Master the method to start the chassis integrated service node
mcp_service.launch.pythat includes OpenClaw bridgingMaster the method to start the speech recognition and wake-up node
asr_detect, and be proficient in using hardware wake-up word and terminal spacebar wake-upBe able to issue embodied commands such as chat Q&A, chassis movement, and arm spatial operations to the robot through natural voice
Understand the configuration modifications for the core parameter configuration file
common.yamland common troubleshooting tips
2. System Architecture and Working Principle
Core Interaction Timing Flow
Wake-up and Interrupt: User calls the hardware wake-up word "Hi, yahboom",
asr_detectcaptures the wake-up event, publishes the/wakeup_signaltopic to interrupt the currently playing TTS broadcast, and plays a response prompt tone ("I'm here");Speech-to-Text (ASR): User speaks the command, Silero VAD module detects human voice and automatically closes the audio stream after the user finishes speaking, ASR engine precisely converts it to text and publishes to
/asr_result;LLM Reasoning and Tool Calling:
openclaw_bridgedelivers the text to OpenClaw Gateway, the large model analyzes user intent:If it belongs to general conversation/common sense Q&A: directly generate response text;
If it belongs to robot embodied control: the large model directly calls robot operation tools provided by
mcp_servicethrough the MCP protocol (for example, making the car move forward, controlling arm movement, etc.);
Speech Synthesis and Feedback (TTS): The response content is printed in real-time streaming via
openclaw_bridgeterminal, while simultaneously calling the TTS engine to synthesize speech and deliver it to the speaker for playback, achieving an integrated voice-action real interaction.
3. Voice Interaction Startup Steps
Start core nodes such as odometry, TF transformation, arm assistance, camera nodes, and MCP service:
ros2 launch dofbot_pro_bringup mcp_service.launch.pyIf you need voice broadcast responses, you can start the program with the
launch_openclaw_bridgeparameter, otherwise you can use the basic command above:
xxxxxxxxxxros2 launch dofbot_pro_bringup mcp_service.launch.py launch_openclaw_bridge:=true

Run the voice dialogue interaction with the following command:
xxxxxxxxxxros2 run ackermann_mcp asr_detect

After waking up by calling the wake-up word "Hi, yahboom", the indicator light turns on, and you can speak the content you want to dialogue about:

Once successfully woken up, you can chat with OpenClaw as usual
Tip
Whether waking up via voice call or pressing the spacebar, when you hear the robot prompt tone, you can directly speak your command naturally.
Typical Dialogue and Control Cases
Case 1: Intelligent Common Sense and Chat Q&A
User Question: "Introduce yourself, what functions do you have?"
Case 2: Chassis Motion Control Command
User Command: "Move forward 0.5 meters."
Case 3: Arm Posture and Action Control
User Command: "Have the arm say hello to me."
4. Parameter Configuration and Personalized Tuning
The core parameters of the voice interaction system are defined in the following configuration file:
xxxxxxxxxx$HOME/yahboomcar_ros2_ws/dofbot_pro_ws/src/dofbot_pro_bringup/config/common.yaml
Open this file with an editor to modify the following two configuration sections as needed:
4.1 asr_detect Speech Recognition Node Configuration
xxxxxxxxxxasr_detect ros__parameters enable_wakeup_voiceTrue # Whether to play a prompt tone ("I'm here") on wake-up enable_keybord_wakeupTrue # Whether to enable keyboard spacebar wake-up function enable_kws_wakeupTrue # Whether to enable hardware serial voice wake-up function language"zh" # Language setting: zh for Chinese, en for English use_oline_asrTrue # Whether to use cloud online speech recognition (True has higher recognition rate) asr_supplier"aliyun" # Speech recognition service provider: aliyun or xunfei oline_asr_model"paraformer-realtime-v2" # Aliyun online speech recognition model aliyun_api_key"your-api-key" # Aliyun API Key (can also configure environment variable ALIYUN_API_KEY) mic_serial_port"/dev/myspeech"# Microphone hardware serial device name no_speech_timeout5.0 # Maximum waiting time for no sound input after wake-up (seconds)4.2 openclaw_bridge Bridge Node Configuration
xxxxxxxxxxopenclaw_bridge ros__parameters enable_voice_replyTrue # Whether to enable TTS voice broadcast reply (set to False for terminal text only) language"zh" # Broadcast language: zh for Chinese, en for English openclaw_base_url"http://127.0.0.1:18789/v1" # OpenClaw Gateway OpenAI-compatible interface address openclaw_api_key"yahboom" # OpenClaw gateway connection token openclaw_session"robot-session-001" # Conversation session ID use_oline_ttsTrue # Whether to use online cloud TTS tts_supplier"aliyun" # Speech synthesis service provider: aliyun / baidu / xunfei tongyi_tts_model"cosyvoice-v1" # Aliyun speech synthesis model voice_tone"longxiaochun" # Voice timbre (such as intellectual female voice, child voice, young male voice, etc.) tts_playback_timeout120.0 # Maximum timeout for single audio playbackNote
After modifying the common.yaml file, you must restart the corresponding ROS 2 node for the parameters to take effect.
5. Common Problems and Solutions
5.1 Starting asr_detect Shows Cannot Open Serial Port /dev/myspeech
Symptoms: Terminal reports Cannot open serial port /dev/myspeech, please check voice wakeup module connection.
Possible causes and solutions:
Hardware voice module not connected: If the hardware speech recognition module is not yet plugged in, this is a normal prompt. In this case, the program will automatically degrade; you can perform keyboard wake-up interaction by pressing the spacebar in the terminal, and the functionality will not be affected;
Insufficient serial port permissions: Check if you have access permissions, run
ls -l /dev/myspeech; if permissions are insufficient, executesudo chmod 777 /dev/myspeechor add the current user to thedialoutgroup.
5.2 No Recognized Text Output in Terminal After Speaking
Symptoms: After wake-up, speaking but the terminal does not print recognized text.
Possible causes and solutions:
Microphone input volume too low or environment noisy: Speak clearly closer to the microphone, or check the USB microphone recording gain via system
alsamixer;Online ASR service configuration abnormal: If using
aliyunorxunfeionline ASR, check if the network connection is normal and if the API-KEY is valid.
5.3 Terminal Recognizes Text, But OpenClaw Has No Response or Reports Connection Failed
Symptoms: asr_detect outputs text normally, but terminal 1's openclaw_bridge reports OpenClaw Request failed: Connection refused.
Possible causes and solutions:
OpenClaw gateway not running: Execute
openclaw gateway statusto check gateway status; if not started, executeopenclaw gateway restartto restart the gateway;Port or address mismatch: Confirm whether
openclaw_base_urlincommon.yamlmatches the gateway's actual listening address and port (defaulthttp://127.0.0.1:18789/v1).