en:server_docs:robot_pipe:robot_pipe_cmd_play_tts

Play TTS Command

Overview

  • This API is used to send a command to the robot to play TTS (Text-to-Speech), remotely controlling the robot to play TTS.

Authorization

Data Dimension Authorization Enterprise-level Authorization This API requires enterprise-level authorization. Both enterprise-level and agent-level authorization accounts can call this API. Please refer to Authorization Methods.
Interface Dimension Authorization Default Authorization This API is granted by default, so you don't need to apply for interface dimension authorization separately for your authorization account. Please refer to Authorization Methods.

Request

Request Entry Point

HTTP URL Path /v1/robot/pipe/cmd_play_tts
HTTP Method POST
Content-Type application/x-www-form-urlencoded
Parameter Type Required Description
Authorization string Yes
  • Access token
  • Format: Bearer access_token
  • Example: Bearer T.WcnhSdYj-kwVBpP27LRQrw.OBt95zE4TH-OPzIX6OkEWPo4rbR6s.ori-67facfd90b2744220a5eae850e51
  • Please refer to: Authentication Methods
Parameter Type Required Description
robot_sn string Yes Robot SN, separated by commas if multiple.
is_batch int Yes Constant value: 1
msg_value string Yes TTS (Text-to-Speech) to be played
# Please replace the entry point with yours according to your region
curl --location 'https://global-openapi.orionstar.com/v1/robot/pipe/cmd_play_tts' \
     --header 'Authorization: Bearer YOUR-ACCESS-TOKEN' \
     --header 'Content-Type: application/x-www-form-urlencoded' \
     --data-urlencode 'robot_sn=test_sn' \
     --data-urlencode 'is_batch=1' \
     --data-urlencode 'msg_value=Hello'

Response

Parameter Type Description
code int Error code. 0 means success, non-zero means failure, Please refer to Error Codes.
msg string Error description. When there is a failure, a specific error description will be provided.
req_id string Log tracking ID. When encountering problems that require assistance from OrionStar, please provide this tracking ID value.
data object Business data object, see below for details Response Body Data Object.
Parameter Type Description
result_list array An array of objects containing information about the results of command submissions to robots. Each element in the array is an object representing the result of a command submission. Please refer to Robot Command Submission Result Information Object for details.
Parameter Type Description
ret string Error code of the submission result. 0 indicates success, non-zero indicates failure.
msg string Error description of the submission result. A specific error description is provided in case of failure.
msg_id string Global unique ID of the command message
robot object Basic information object of the robot
robot.robot_sn string Robot SN, used for corresponding with the robot_sn passed in batch command submission scenarios (where multiple SNs are passed as request parameters) and the SN of the requested robot.
{
    "code": 0,
    "msg": "",
    "data" : {
        "result_list": [
            {
                "ret": "0",
                "msg": "",
                "msg_id": "test_msg_id",
                "robot": {
                    "robot_sn": "test_sn",
                }
            },
            // ... Other information about command submission results for robots
        ]
    }
}
  • Last modified: 2024-04-09 20:57 +0800