tencent cloud

$0 14-Day TrialExperience EdgeOne for acceleration and security protection!

Feedback

Tencent Cloud AI Digital Human

Using the Personal Asset Image to Create a Stream

Last updated: 2025-01-17 16:24:37
It is used to create a new video stream and obtain the playback URL for the digital human video.

Calling Protocol

HTTPS + JSON
POST /v2/ivh/sessionmanager/sessionmanagerservice/createsessionbyasset
Header Content-Type: application/json;charset=utf-8

Request Parameters

Parameter Name
Type
Required
Description
ReqId
String
Yes
Unique identifier for each request, a 32-character UUID.
SessionId
String
No
A unique identifier for the session. The SaaS environment does not allow input from the cloud; the Private Environment allows input.
AssetVirtualmanKey
String
Yes
Personal asset image ID. It is obtained from the Asset Management of the digital human platform, as shown in the image:

Loading…


UserId
String
Yes
The unique identifier for the user, maintained by the caller. Creating a new stream with the same UserIdentifier will cause the previous stream with that UserIdentifier to close.
Protocol
String
Yes
Currently supported parameters: rtmp, trtc and webrtc
DriverType
int
Yes
The driving method for the digital human.
1: text-only driving;
3: audio driving (original voice), which supports both audio and text driving modes in this setting;
ProtocolOption
No
Custom parameters for the protocol; ignore trtc if it is not used.
SpeechParam
No
Parameters related to timbres.

ProtocolOption

Name
Type
Required
Description
TrtcUseExternalApp
boolean
No
It indicates whether to use an external trtc. If you do not use it, the unified trtc appid of the digital human platform will be used.
Notes:
When the unified trtc appid of the digital human platform is used, it is limited to the debugging stage and cannot be used in the production stage.
TrtcAppId
string
No
The trtc appid (required when using an external trtc appid).
TrtcRoomId
int
No
The trtc room ID (The room ID will be assigned by the cloud if it is not specified.).
TrtcUserSig
string
No
The trtc AI Digital Human user signature (required when using an external trtc appid).
TrtcPrivateMapKey
string
No
The trtc AI Digital Human user permission key (required when using an external trtc appid).
CssCustomPushUrl
string
No
Custom Cloud Streaming Services (CSS) streaming URL. The streaming protocol is fixed to use rtmp. By using rtmp to push the stream to CSS, various pull protocols supported by CSS can be used for playback. The required format for the streaming URL is:
rtmp://xyz.com/cssAppName/streamid?txSecret={0}&txTime={1} For the calculation method of txSecret and txTime, see https://cloud.tencent.com/document/product/267/32720
SpeechParam
Name
Type
Required
Description
Speed
float
No
Speech speed, with a range of [50, 200]. A value of 50 indicates 50% of the default speed. If the speed is not specified, it is recommended to use the default value of 100.
TimbreKey
string
No
Timbre key.
Volume
int
No
Volume level, with a range of [-10, 10]. A value of -10 indicates a decrease of 10 dB relative to the default volume. If the volume is not specified, it is recommended to use the default value of 0.
TimbreLanguage
string
No
Timbre languages, optional languages can be found in the Personal Asset Management API Paginated Query Timbre List API. For multilingual timbres, the corresponding language must be selected during synthesis.

Response Parameter

Name
Type
Required
Description
ReqId
String
Yes
Unique identifier for a single request.
SessionId
String
Yes
Unique identifier for the session
SessionStatus
int
Yes
Status:
1: In progress (ready), the cache hit directly provides the playback URL.
3: Preparing (not ready), the cache missed requires waiting for model to load. Use the Querying the Session Status API to poll the session status until the stream status changes to 1. This usually takes no more than 2 minutes.
PlayStreamAddr
String
No
The playback URL, in the format: rtmp://liveplay.ivh.qq.com/live/m789
This field will not be returned if a custom CSS streaming URL is specified through the CssCustomPushUrl parameter.

Request Sample

{ "Header": { }, "Payload": { "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf", "AssetVirtualmanKey": "d7aa08da33dd4a662ad5be508c5b77cf", "DriverType": 1, "UserId": "henry", "Protocol": "rtmp" } }

Response Sample

{ "Header": { "Code": 0, "Message": "", "RequestID": "123" }, "Payload": { "ReqId": "d7aa08da33dd4a662ad5be508c5b77cf", "SessionId": "m789", "SessionStatus": 1, "PlayStreamAddr": "rtmp://live.qq.com/live/m789" } }


Catalog

In The Article

Using the Personal Asset Image to Create a Stream

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon