Currently, the robot only supports using an external microphone (the Shike lavalier microphone) as the interaction input source; the built-in microphone is not yet configured or enabled.
Additionally, the system supports setting Silent Mode via AimMaster and provides RPC interfaces for programmatic control of this mode.
We also provide access to raw microphone audio output (including audio data processed with noise reduction, echo cancellation, and VAD). After disabling the A2 interaction pipeline, users can utilize this interface to capture microphone audio and integrate it with custom interaction systems.
Please note that Silent Mode is an operational state within Normal Mode, allowing for flexible switching without the need to restart the agent.
only_voice: Only output noise-reduced microphone audio /agent/process_audio_output, subsequent pipeline is completely disconnected
normal: Standard operation mode, interaction runs normally
Output Parameters
text
{
"state": "CommonState_UNKNOWN"
}
Example Script
examples/agent/SetAgentPropertiesRequest.sh
Remarks
Requires a robot reboot to take effect after calling
It is normal for the return value to be CommonState_UNKNOWN after calling. You can call the GetAgentPropertiesRequest interface to check if the interaction mode switch was successful
stream_id: Microphone identifier, 1 for built-in mic, 2 for external mic
vad_state: Voice activity detection status
AUDIO_VAD_STATE_NONE = 0
AUDIO_VAD_STATE_BEGIN = 1
AUDIO_VAD_STATE_PROCESSING = 2
AUDIO_VAD_STATE_END = 3
audio_data: Audio byte stream data
Example Script
examples/agent/get_voice.py
Remarks
The ROS2 message type for this message is ros2_plugin_proto/msg/RosMsgWrapper, requires sourcing prebuilt/ros2_plugin_proto_aarch64/share/ros2_plugin_proto/local_setup.bash before use.
Note: To obtain the following audio, the robot needs to be connected to the internet for at least 2 minutes after startup to complete audio-related authentication operations, otherwise there will be no raw audio output. For offline use, please first ensure that this interface has audio output before disconnecting from the network.
Note: In the current version, the vad_state output of the external microphone interface has issues. The expected state for one voice input is 122222222223, but the actual output state is 0111111111112. This issue only appears in external microphone scenarios (built-in microphone works normally) and is planned to be fixed in subsequent versions. In the current version, it is recommended to manually perform +1 compensation on the state.
confidence: Speech matching confidence, numerical value between 0-1
Keyword: Wake-up word
language: Currently only supports Chinese
wakeup_type:
WAKEUP_UNKNOWN : Wake-up with unknown source or status (placeholder/exception scenario)
WAKEUP_NORMAL : Normal voice wake-up, for example user speaks default wake-up word.
WAKEUP_CUSTOM_TRIGGERED : Wake-up triggered by custom method, such as custom wake-up word or external event.
Example Script
examples/agent/get_wakeup_result.py
Remarks
The ROS2 message type for this message is ros2_plugin_proto/msg/RosMsgWrapper, requires sourcing prebuilt/ros2_plugin_proto_aarch64/share/ros2_plugin_proto/local_setup.bash before use.