tencent cloud

Cloud Infinite

Updating a Template

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-09-15 17:39:16

Feature Description

Update voice/sound separation transcoding template.

Authorization Description

When using a sub-account, you need to add the ci:UpdateMediaTemplate permission to the action in the authorization policy. For ALL supported operation APIs of Cloud Infinite, see CI action.

Service Activation

To use this feature, you need to bind a bucket in advance and enable Cloud Infinite service.
To use this feature, you need to enable Smart Audio Service in advance via the console or API.
Note:
After binding Cloud Infinite, if you manually perform the unbinding operation on the bucket, you will not be able to continue using this function.

Use Limits

When using this API, please confirm the related use limits. For details, see Use Limits.


Request

Request sample

PUT /template/<TemplateId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Note:
Authorization: A request header that carries authentication information to verify the legitimacy of the request. For details, see the Request Signature document.
<TemplateId>: The voice separation template ID. For details, see create a voice separation template.

Request header

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body

The implementation of the request operation requires the following request body:
<Request>
<Tag>VoiceSeparate</Tag>
<Name>TemplateName</Name>
<AudioMode>IsAudio</AudioMode>
<AudioConfig>
<Codec>aac</Codec>
<Samplerate>44100</Samplerate>
<Bitrate>128</Bitrate>
<Channels>2</Channels>
</AudioConfig>
</Request>
The detailed data is described as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
The Request of the voice separation template API
Container
Yes

Response

Response Headers

Note:
Authorization: Auth String (For details, refer to Request Signature).

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<RequestId>NjJmMWQxYjNfOTBmYTUwNjRfNWYyY18x</RequestId>
<Template>
<Tag>VoiceSeparate</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<VoiceSeparate>
<AudioMode>IsAudio</AudioMode>
<AudioConfig>
<Codec>aac</Codec>
<Samplerate>44100</Samplerate>
<Bitrate>128</Bitrate>
<Channels>2</Channels>
</AudioConfig>
</VoiceSeparate>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
The Response of the voice separation template API
Container

Error Code

This request returns common error responses and error codes. For more information, see Error Codes.

Practical Case

Request

PUT /template/t1460606b9752148c4ab182f55163ba7cd HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************
Host: test-1234567890.ci.ap-beijing.myqcloud.com
Content-Length: 1666
Content-Type: application/xml

<Request>
<Tag>VoiceSeparate</Tag>
<Name>TemplateName</Name>
<AudioMode>IsAudio</AudioMode>
<AudioConfig>
<Codec>aac</Codec>
<Samplerate>44100</Samplerate>
<Bitrate>128</Bitrate>
<Channels>4</Channels>
</AudioConfig>
</Request>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 100
Connection: keep-alive
Date: Thu, 14 Jul 2022 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<RequestId>NTk0MjdmODlfMjQ4OGY3XzYzYzhf****</RequestId>
<Template>
<Tag>VoiceSeparate</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<VoiceSeparate>
<AudioMode>IsAudio</AudioMode>
<AudioConfig>
<Codec>aac</Codec>
<Samplerate>44100</Samplerate>
<Bitrate>128</Bitrate>
<Channels>2</Channels>
</AudioConfig>
</VoiceSeparate>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan