7.2 TTS/Audio Playback Section
7.2 TTS/Audio Playback Section
7.2.1 Overview
A3 robot is equipped with a speaker. With network access, it can perform TTS playback. Without network, it can play basic audio files and adjust volume. It also supports playback status query and interruption control logic.
7.2.2 TTS Playback RPC Interface
| Interface Name | pb:/aimdk.protocol.TTSService/PlayTTS |
|---|---|
| Function Overview | TTS playback interface, requires network connection |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:59301/rpc/aimdk.protocol.TTSService/PlayTTS |
| Input Parameters | text
|
| Output Parameters | text
|
| Example Script | examples/agent/tts_broadcast.sh |
| Remarks |
|
7.2.3 Audio File Playback RPC Interface
| Interface Name | pb:/aimdk.protocol.TTSService/PlayMediaFile |
|---|---|
| Function Overview | Audio file playback |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:59301/rpc/aimdk.protocol.TTSService/PlayMediaFile |
| Input Parameters | text
|
| Output Parameters | text
|
| Example Script | examples/agent/play_media_file.sh |
| Remarks |
|
7.2.4 TTS/Audio File Playback Status Query RPC Interface
| Interface Name | pb:/aimdk.protocol.TTSService/GetAudioStatus |
|---|---|
| Function Overview | TTS/Audio file playback status query |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:59301/rpc/aimdk.protocol.TTSService/GetAudioStatus |
| Input Parameters | text
|
| Output Parameters | text
|
| Example Script | examples/agent/tts_status_rpc.sh |
| Remarks |
|
7.2.5 TTS/Audio File Playback Status Topic Interface
| Interface Name | /interaction/tts_status |
|---|---|
| Function Overview | TTS/Audio file playback status |
| Interface Type | ROS2 Topic |
| Output Parameters | text
|
| Example Script | examples/agent/tts_status_topic.py |
| Remarks |
|
7.2.6 TTS/Audio File Playback Interruption RPC Interface
| Interface Name | pb:/aimdk.protocol.TTSService/StopTTSTraceId |
|---|---|
| Function Overview | Interrupt single file/TTS playback |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:59301/rpc/aimdk.protocol.TTSService/StopTTSTraceId |
| Input Parameters | text
|
| Output Parameters | text
|
| Example Script | examples/agent/stop_tts.sh |
| Notes |
7.2.7 Audio Volume Get/Set RPC Interface
| Interface Name | pb:/aimdk.protocol.HalAudioService/GetAudioVolume |
|---|---|
| Function Overview | Get current volume |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:56666/rpc/aimdk.protocol.HalAudioService/GetAudioVolume |
| Input Parameters | text |
| Output Parameters | text
|
| Example Script | examples/hal_audio/GetAudioVolume.sh |
| Remarks |
| Interface Name | pb:/aimdk.protocol.HalAudioService/SetAudioVolume |
|---|---|
| Function Overview | Set volume |
| Interface Type | HTTP JSON RPC |
| URL | http://10.42.10.10:56666/rpc/aimdk.protocol.HalAudioService/SetAudioVolume |
| Input Parameters | text
|
| Output Parameters | text
|
| Example Script | examples/hal_audio/SetAudioVolume.sh |
| Remarks |
|
7.2.8 Request Audio Focus
| Interface Name | /audio_5Fmsgs/srv/RequestAudioFocus |
|---|---|
| Function Overview | Request audio focus |
| Interface Type | services |
| Input Parameters | text
|
| Example Script | examples/agent/RequestAudioFocus.sh |
| Remarks | Before use, source the ROS environment: source prebuilt/audio_msgs_proto_aarch64/share/audio_msgs/local_setup.bash |
7.2.9 Release Audio Focus
| Interface Name | /audio_5Fmsgs/srv/AbandonAudioFocus |
|---|---|
| Function Overview | Release audio focus |
| Interface Type | services |
| Input Parameters | text
|
| Example Script | examples/agent/AbandonAudioFocus.sh |
| Remarks | Before use, source the ROS environment: source prebuilt/audio_msgs_proto_aarch64/share/audio_msgs/local_setup.bash |
7.2.10 Play Streaming Audio
| Interface Name | /audiohal/audio/playback |
|---|---|
| Function Overview | Play streaming audio |
| Interface Type | topic |
| Input Parameters | text
|
| Example Script | examples/agent/audio_examples_sender |
| Remarks | Before use, source the ROS environment: source prebuilt/audio_msgs_proto_aarch64/share/audio_msgs/local_setup.bash |