yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
RDK X5 Board📖
1.Introduction to RDK X5 board
  • 1.Introduction to RDK X5 board
  • 2.Write system file
  • 3.Hardware interface description
  • 4.Install case and other accessories
  • 5.Use 7-inch display
2.Basic settings course
  • 1.Network configuration
  • 2.Remote login
  • 3.Update system
  • 4.srpi-config user guide
  • 5.config. txt configuration file
  • 6.Self-startup setting
  • 7.RDK exclusive command usage
  • 8.Linux command usage
  • 9.GPIO readwrite operation
  • 10.Image classification algorithm
  • 11.Use USB camera
  • 12.Use MIPI camera
  • 13.Binocular camera depth algorithm
3.Basic development course
C language
  • 1.Camera image display
  • 2.Local save camera images
  • 3.Camera image encoding
  • 4.Video file decoding
  • 5.RTSP streaming decoding
  • 6.VPS scaling example
  • 7.Target detection algorithm-fcos
  • 8.Target detection algorithm-YOLOv5s
  • 9.Using CAN
Python
  • 0.ReadMe
  • 1.Using GPIO
  • 2.Using PWM
  • 3.Using Serial port
  • 4.Using I2C
  • 5.Using SPI
4.ROS expansion board
Python basic control
  • 0.Bind PCB port devices
  • 1.Install the Rosmaster driver library
  • 2.Buzzer whistle
  • 3.Control PWM servo
  • 4.RGB colorful light bar special effects display
  • 5.Control the forward and reverse rotation of the motor
  • 6.Control the movement of the robot
  • 7.Control Serial Servo
  • 8.Update firmware of expansion board
  • 9.Drive OLED
ROS2 robot control
  • 1.Function package usage process
  • 2.Robot information release
  • 3.Robot keyboard control
  • 4.Robot state estimation
  • 5.Robot calibration
  • 6.URDF model
5.T-MINI PLUS Lidar
  • 0.Preparation before use(Must read)
  • 1.Environment setup
  • 2.T-MINI PLUS LiDAR drive
  • 3.Handheld LiDAR mapping
6.AI VIEW Depth camera
AI VIEW Depth camera use
  • 1.AI VIEW Depth camera use
  • 2.Camera internal parameter calibration
  • 3.Color tracking
  • 4.KCF object tracking
Mediapipe functions
  • 1.Hand detection
  • 2.Attitude detection
  • 3.Overall inspection
  • 4.Facial detection
  • 5.Facial recognition
OpenCV series courses
  • 1.ROS+opencv application
  • 2.QR code creation and recognition
  • 3.AR vision
7.Offline AI model course
Offline-LLM-Text-Interaction
  • 0.AI-Large-Model-Image-Description
  • 1.AI-Large-Model-Environment-Deployment
  • 2.LLM-Conversation-Platform-Installation
  • 3.Meta-AI-Llama3.2-Model
  • 4.Alibaba-Cloud-Qwen3-Model
  • 5.Microsoft-Phi-4-mini-Model
  • 6.DeepSeek-DeepSeek-R1-Model
  • 7.Alibaba-Cloud-Qwen2.5vl-Vision-Multimodal-Model
  • 8.Google-Gemma3-Vision-Multimodal-Model
  • 9.Llava-Vision-Multimodal-Model
  • 10.MiniCPM-V-Vision-Multimodal-Model
  • 11.Multimodal-Text-to-Image-Application
  • 12.Multimodal-Video-Analysis-Application
  • 13.Multimodal-Visual-Understanding-Application
  • 14.Multimodal-Visual-Localization-Application
  • 15.Multimodal-Table-Scanning-Application
  • 16.Multimodal-Autonomous-Agent-Application
Offline-LLM-Voice-Interaction
  • 0.Voice-Interaction-Hardware-Connection-Must-Read
  • 1.Offline-Speech-to-Text-ASR
  • 2.Offline-Text-to-Speech-TTS
  • 3.AI-Large-Model-Voice-Interaction
  • 4.Multimodal-Visual-Understanding-Voice-Interaction
  • 5.Multimodal-Text-to-Image-Application
  • 6.Multimodal-Video-Analysis-Application
  • 7.Multimodal-Visual-Localization-Application
  • 8.Multimodal-Table-Scanning-Application
  • 9.Multimodal-Autonomous-Agent-Application
  • 10.AI-Large-Model-Offline-Voice-Assistant
8.Online AI model course
Online-LLM-Text-Interaction
  • 1.OpenRouter-Large-Model-API-Aggregation-Platform
  • 2.Multimodal-Visual-Understanding-Application
  • 3.Multimodal-Visual-Localization-Application
  • 4.Multimodal-Table-Scanning-Application
  • 5.Multimodal-Autonomous-Agent-Application
Online-LLM-Voice-Interaction
  • 0.Voice-Interaction-Hardware-Connection-Must-Read
  • 1.Online-Speech-to-Text-ASR
  • 2.Online-Text-to-Speech-TTS
  • 3.AI-Large-Model-Voice-Interaction
  • 4.Multimodal-Visual-Voice-Interaction
  • 5.Multimodal-Visual-Localization-Application
  • 6.Multimodal-Table-Scanning-Application
  • 7.Multimodal-Autonomous-Agent-Application
  • 8.AI-Large-Model-Online-Voice-Assistant
9.YOLO26 tutorials
  • 01.YOLO environment construction
  • 02.CLI use
  • 03.Object detection
  • 04.Instance segmentation
  • 05.Pose estimation
  • 06.Image classification
  • 07.Oriented bounding box object detection
  • 08.Model conversion
  • 09.Dataset annotation
  • 10.Model training conversion
  • 11.Model prediction
10.OpenClaw Deployment and Basic Usagenew
  • 01.OpenClaw Quick Start
  • 02.OpenClaw Deployment
  • 03.OpenClaw WhatsApp Plugin Application
  • 04.OpenClaw WebChat Interaction
  • 05.OpenClaw TUI Interaction
  • 06.OpenClaw Tools Introduction
  • 07.OpenClawGate Gateway User Manual
  • 08.OpenClaw Features Overview
  • 09.OpenClawClawHub Introduction (Skill Installation)
  • 10.OpenClaw Application - File Management
  • 11.OpenClaw Application - Camera
  • 12.OpenClaw Application - Browser Control
  • 13.OpenClaw Application - Script Execution
  • 14.OpenClaw Application - AI Programming (Peripheral & GPIO Control)
  • 15.OpenClaw Application - Dedicated AI Assistant
  • 16.OpenClaw Web Search Capability Configuration
11.OpenClaw Advanced Developmentnew
1.Preparation Before Use
  • 01. Peripheral Hardware Configuration
  • 02. OpenClaw API-KEY Configuration
  • 03. OpenClaw Model Switching
  • 04. OpenClaw Prompts
  • 05. AI Voice Interaction Configuration
  • 06. Three Dialogue Configuration Tests
2.OpenClaw AI Programming Peripheral Control
  • 1. Servo Control
  • 2. RGB Strip
  • 3. OLED Display
  • 4. Temperature and Humidity Sensor
  • 5. Camera Application
  • 6. AI Script Peripheral Control
3.OpenClaw Peripheral Integration Applications
  • 1. Plant Care Assistant
  • 2. AI Calorie Estimation
  • 3. AI Rock Paper Scissors Game
  • 4. AI Pet
  • 5. AI Weather Station
  • 6. Temperature and Humidity Dashboard
  • 7. Scheduled Tasks
12.ROS2 basic course
  • 1.Introduction to ROS2
  • 2.ROS2 install Humble
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
Download
  • System_File
  • Code
  • Tools
Download ZIP

Welcome to RDK X5 Board repository

05. AI Voice Interaction Configuration

OpenClaw AI Voice Interaction Configuration

OpenClaw AI Voice Interaction Configuration1. Course Overview2. Overall Voice Interaction Pipeline3. Voice Configuration File Description3.1 Configuration File Location3.2 Minimum Configuration to Check Before Startup4. Key Parameter Description4.1 Voice Recognition Engine4.2 Microphone and Speaker Devices4.3 DashScope Authentication and ASR Model4.4 TTS Voice Broadcast Configuration4.5 OpenClaw Gateway Configuration Reference4.6 Serial Port Wake-up Configuration4.7 Steps to Switch Between Chinese and English5. Starting Voice Interaction5.1 Prepare Virtual Environment5.2 Startup Method5.3 If Other Interaction Methods Need Broadcasting6. Configuration Verification Methods6.1 Verify if Voice Program Can Start6.2 Verify Recognition and Publishing Process6.4 Verify TTS [Optional]7. Common Issues7.1 Program Startup Failure7.2 No Recognition Result After Wake-up7.3 Recognition Successful but OpenClaw No Response7.4 Can Recognize but No Sound Broadcast7.5 Serial Port Wake-up Failure8. Recommended Debugging Order

1. Course Overview

This course will introduce how to configure the AI voice interaction pipeline in OpenClaw, including the location of voice configuration files, descriptions of key parameters, startup methods, and troubleshooting for common issues.

After completing this course, you will be able to:

  • Know which configuration file is used for AI voice interaction
  • Understand the meaning of key parameters in .env
  • Master the method to switch between Chinese and English voice recognition
  • Correctly start the voice program

2. Overall Voice Interaction Pipeline

The current voice interaction flow in OpenClaw can be simply understood as:

  1. Microphone captures voice
  2. Program performs silence detection and segmentation
  3. ASR engine converts voice to text
  4. Recognition results are published to OpenClaw
  5. OpenClaw returns results
  6. [Optional] TTS broadcasts the returned results (you can choose whether to broadcast as replies can be very long)

The core configuration file for this pipeline is:

/home/sunrise/voice_to_openclaw/.env

3. Voice Configuration File Description

3.1 Configuration File Location

Default uses the accompanying factory image

xxxxxxxxxx
/home/sunrise/voice_to_openclaw/.env

If this file does not exist, you can copy it from the template first:

xxxxxxxxxx
cd /home/sunrise/voice_to_openclaw
cp .env.example .env

3.2 Minimum Configuration to Check Before Startup

It is recommended to confirm at least the following items:

  • ASR_ENGINE
  • DASHSCOPE_API_KEY
  • DASHSCOPE_LANGUAGE or XUNFEI_ASR_LANGUAGE
  • DEVICE
  • SPEAKER_DEVICE
  • OPENCLAW_CONFIG_PATH
  • ENABLE_SERIAL_WAKE

4. Key Parameter Description

4.1 Voice Recognition Engine

xxxxxxxxxx
ASR_ENGINE=dashscope

Currently supports three modes:

  • dashscope: Tongyi Bailian native voice recognition interface, suitable for direct online use
  • xunfei_ws: iFlytek WebSocket voice recognition, suitable for overseas version configuration
  • faster_whisper: Local Whisper recognition, suitable for local operation (not supported by RDK)

4.2 Microphone and Speaker Devices

xxxxxxxxxx
DEVICE=0
SPEAKER_DEVICE=0

These two parameters determine which audio input and output devices the program uses.

Suitable scenarios for modification:

  • Multiple microphone devices
  • USB microphone is not the system default device
  • Speaker output is directed to the wrong device

If the voice program starts but you cannot hear sound or record sound, check here first.

4.3 DashScope Authentication and ASR Model

Apply for an API key by logging into Alibaba Cloud Bailian.

Link: Large Model Service Platform Bailian Console

image-20260428112611830

xxxxxxxxxx
DASHSCOPE_API_KEY=
DASHSCOPE_API_URL=https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
DASHSCOPE_ASR_MODEL=qwen3-asr-flash

Where:

  • DASHSCOPE_API_KEY: Must fill in a valid API-KEY
  • DASHSCOPE_API_URL: Default is already provided
  • DASHSCOPE_ASR_MODEL: Default voice recognition model

If this is not configured correctly, common phenomena include:

  • Recognition fails after program startup
  • Returns authentication error
  • Voice recognition request times out or reports model error

4.4 TTS Voice Broadcast Configuration

xxxxxxxxxx
ENABLE_TTS=false
WAKE_ACK_TEXT=I am here.

If you want voice broadcast after voice recognition, you can enable it:

xxxxxxxxxx
ENABLE_TTS=true

Current common TTS parameters include:

  • DASHSCOPE_TTS_MODEL
  • DASHSCOPE_TTS_VOICE
  • DASHSCOPE_TTS_VOLUME
  • DASHSCOPE_TTS_SPEECH_RATE

It is recommended to get ASR working first before considering enabling TTS.

4.5 OpenClaw Gateway Configuration Reference

xxxxxxxxxx
OPENCLAW_CONFIG_PATH=~/.openclaw/openclaw.json
OPENCLAW_TIMEOUT=70  # Maximum retry time, waiting for OpenClaw response. If it's a long task, it is recommended to increase this time.
OPENCLAW_RETRY=1

This part of the configuration determines how the voice program sends recognition results to OpenClaw.

By default:

  • The program reads openclaw.json
  • Automatically derives the local gateway port
  • Automatically reads the gateway authentication token

Therefore, if voice recognition is successful but OpenClaw does not execute instructions, check here first.

4.6 Serial Port Wake-up Configuration

xxxxxxxxxx
ENABLE_SERIAL_WAKE=true
MIC_SERIAL_PORT=/dev/ttyUSB0
MIC_SERIAL_BAUDRATE=115200
SERIAL_WAKE_REQUIRED=true

If you are using the accompanying voice module, serial port wake-up mode is usually adopted.

The main functions are:

  • Wait for wake-up signal normally
  • Start capturing the next segment of voice upon receiving wake-up
  • Return to waiting state after processing is complete

If you do not have the accompanying serial port wake-up module, you can adjust as needed:

xxxxxxxxxx
ENABLE_SERIAL_WAKE=false

4.7 Steps to Switch Between Chinese and English

If you need to switch voice interaction from Chinese to English, it is recommended to directly modify the language parameters in .env and then restart the program.

Currently, voice_to_openclaw/.env enables the Domestic Version (Bailian) by default.

Method 1: Overseas Version (iFlytek International Edition)

Main configuration items:

xxxxxxxxxx
XUNFEI_ASR_LANGUAGE=en_cn
XUNFEI_ASR_ACCENT=mandarin
  • Chinese recognition: XUNFEI_ASR_LANGUAGE=zh_cn
  • English recognition: XUNFEI_ASR_LANGUAGE=en_us
  • When the recognition language is changed to English, XUNFEI_ASR_ACCENT is no longer needed; it can be commented out or left with its original value unused.

Example:

​x
# Chinese recognition
XUNFEI_ASR_LANGUAGE=zh_cn
XUNFEI_ASR_ACCENT=mandarin
​
# English recognition
XUNFEI_ASR_LANGUAGE=en_us
# XUNFEI_ASR_ACCENT=mandarin

If TTS is also enabled and you want English broadcast, you also need to change TTS_VOICE to an English voice you have activated; if you just want to verify English recognition first, only change the ASR language.

Method 2: Domestic Version (Bailian)

Main configuration items:

xxxxxxxxxx
DASHSCOPE_LANGUAGE=zh
  • Chinese recognition: DASHSCOPE_LANGUAGE=zh
  • English recognition: DASHSCOPE_LANGUAGE=en

Example:

xxxxxxxxxx
# Chinese recognition
DASHSCOPE_LANGUAGE=zh

If the Bailian solution also enables TTS, it is recommended to switch to the corresponding English voice simultaneously; otherwise, you may encounter a situation where English recognition is normal, but the broadcast still has a Chinese accent.

After modification, re-execute the startup command below to take effect.

5. Starting Voice Interaction

5.1 Prepare Virtual Environment

This step is not required for the factory image. If dependencies are not yet installed, execute first:

xxxxxxxxxx
cd /home/sunrise/voice_to_openclaw
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

5.2 Startup Method

xxxxxxxxxx
cd /home/sunrise/voice_to_openclaw
source .venv/bin/activate
python -m src.main

If startup is successful, the program will enter a state of waiting for wake-up or waiting for voice input.

5.3 If Other Interaction Methods Need Broadcasting

  • Change the broadcast parameter configuration to True
xxxxxxxxxx
ENABLE_TTS=true 
  • Additionally start an independent listener, enter in terminal:
xxxxxxxxxx
cd ~/voice_to_openclaw
source .venv/bin/activate
python -m src.openclaw_session_tts

image-20260527162942497

6. Configuration Verification Methods

6.1 Verify if Voice Program Can Start

Execute:

xxxxxxxxxx
cd /home/sunrise/voice_to_openclaw
source .venv/bin/activate
python -m src.main

If the program starts successfully without immediate errors, the basic environment is likely normal.

6.2 Verify Recognition and Publishing Process

Say "Hello, Xiao Ya" to wake up, then try saying:

  • Tell me a joke
  • Display "Hello" on the OLED

If you can see OpenClaw return text, it means:

  • Microphone capture is normal
  • ASR is normal
  • OpenClaw gateway publishing is normal

image-20260527163141392

6.4 Verify TTS [Optional]

If enabled:

xxxxxxxxxx
ENABLE_TTS=true

Then after OpenClaw returns results, you should be able to hear voice broadcast.

7. Common Issues

7.1 Program Startup Failure

Check first:

  • Whether .venv exists
  • Whether dependencies are installed
  • Whether .env exists

7.2 No Recognition Result After Wake-up

Check first:

  • Whether ASR_ENGINE is configured correctly
  • Whether DASHSCOPE_API_KEY is valid
  • Whether microphone device number DEVICE is correct

7.3 Recognition Successful but OpenClaw No Response

Check first:

  • Whether OPENCLAW_CONFIG_PATH is correct
  • Whether the gateway port in openclaw.json is normal
  • Whether the OpenClaw gateway is started

7.4 Can Recognize but No Sound Broadcast

Check first:

  • Whether ENABLE_TTS is true
  • Whether SPEAKER_DEVICE is correct
  • Whether the speaker is connected normally

7.5 Serial Port Wake-up Failure

Check first:

  • Whether ENABLE_SERIAL_WAKE is true
  • Whether MIC_SERIAL_PORT is correct
  • Whether MIC_SERIAL_BAUDRATE is correct
  • Whether the voice module serial device is recognized by the system

8. Recommended Debugging Order

It is recommended to troubleshoot the voice pipeline in the following order:

  1. First confirm the .env file exists
  2. Then confirm DASHSCOPE_API_KEY is filled in
  3. Start the program to confirm no immediate errors
  4. Check if wake-up is effective
  5. Check if recognition is effective
  6. Check if OpenClaw receives text
  7. Finally check TTS broadcast

 

OpenClaw Prompts
Three Dialogue Configuration Tests

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文