logo
On this page

Drive Digital Human By RTC Audio Stream


Description

Through this API, you can make the digital human play the audio stream from the RTC room.

Note

RTC audio stream driving digital human will interrupt the current digital human's current driving task by default and discard the queued driving tasks.

Request prototype

  • Request method: POST
  • Request body format: JSON
  • Request URL: https://aigc-digitalhuman-api.zegotech.cn?Action=DriveByRTCStream
  • Transmission protocol: HTTPS
  • QPS limit: 10 times/second

Request Parameters

The following request parameter list only shows the API request parameters and some common parameters. For the complete list of common parameters, please refer to Accessing Server APIs - Common Request Parameters.

ParameterTypeRequiredDescription
TaskIdStringYesDigital human video stream task ID. You can obtain it from the response parameters of the CreateDigitalHumanStreamTask API.
RTCConfigObjectYesRTC configuration. For details, please refer to RTCConfig.

RTCConfig

ParameterTypeRequiredDescription
RoomIdStringYesRoom ID of the audio stream source.
StreamIdStringYesStream ID.

Sample request

  • Request URL:

    https://aigc-digitalhuman-api.zegotech.cn?Action=DriveByRTCStream
    &<Common Request Parameters>
  • Request body:

    {
        "TaskId": "c54ffce5-e63c-414f-9342-b0777ae8e691",
        "RTCConfig": {
            "RoomId": "1234567890",
            "StreamId": "test"
        }
    }

Response parameters

ParameterTypeDescription
CodeNumberReturn code. 0 indicates success, other values indicate failure. For error codes and response handling suggestions, please refer to Return Codes.
MessageStringDescription of the request result.
RequestIdStringRequest ID.
└DriveIdStringDigital human video stream driving task ID.

Sample response

{
    "Code": 0,
    "Message": "success",
    "RequestId": "e6f95291-7053-4c87-9bd0-b4b8c56aabfd",
    "Data": {
        "DriveId": "ae8c4d88-44fe-469a-aedf-df06849d0fdc"
    }
}

Previous

Drive Digital Human By Audio

Next

Drive Digital Human By Text