Domain name for API request: vod.intl.tencentcloudapi.com.
This API is used to create AIGC voice replication. Note that calling this API incurs fees. Refer to the billing documentation (https://www.tencentcloud.com/document/product/266/95125?from_cn_redirect=1#96b3b59a-f9e1-49e9-966a-bedb70a4bf12).
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateAigcAudioClone. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| SubAppId | Yes | Integer | Video-on-demand (VOD) application ID. For customers who activate VOD services from December 25, 2023, this field must be filled with the app ID when accessing resources in VOD applications, whether in the default application or a newly created application. |
| AudioFileInfo | Yes | AigcAudioCloneInputFileInfo | Original audio file (ensure it is accessible). The model will use the audio timbre passed in this parameter as an example to replicate the voice type. Input limitations: Note 1: Supported audio formats: mp3, m4a, wav; Note 2: The duration of the uploaded audio file should be no less than 10 seconds and no more than 5 minutes; Note 3: The uploaded audio file size must not exceed 20 MB; Note 4: The audio content must not involve copyright, otherwise it will be removed or terminated. |
| VoiceId | Yes | String | Custom voice ID, for example: "vidu01". Input limitations:
|
| Text | Yes | String | Parameters for clone audition. Parameter format: up to 1000 characters. The model will use the cloned voice type to read aloud the text content and return an audition audio link. Note: Audition will incur text to speech fees based on the number of characters. |
| PromptAudioFileInfo | No | AigcAudioCloneInputFileInfo | Sample audio for voice replication. Providing this parameter will help in enhancing the similarity and stability of the text to speech voice type. If you use this parameter, you need to upload a short sample audio at the same time. Input parameter limits: Note 1: Supported audio formats: mp3, m4a, wav; Note 2: The duration of the uploaded audio must be less than 8 seconds; Note 3: The uploaded audio file size must be no more than 20 mb. |
| PromptText | No | String | The text content corresponding to the sample audio must be consistent with the audio content, and punctuation is required at the end of the sentence. |
| Payload | No | String | Pass-through parameter. Input parameter limit: no processing, data transmission only. Note: up to 1048576 characters |
| SessionId | No | String | Identifier for deduplication. If a request with the same identifier has been sent within the past three days, an error is returned for the current request. The maximum length is 50 characters. If this is not specified or left empty, deduplication is not performed. |
| SessionContext | No | String | Source context. This is used to pass user request information. The audio and video quality revival complete callback returns the value of this field. The maximum length is 1000 characters. |
| TasksPriority | No | Integer | Task priority. The higher the value, the higher the priority. The value range is from -10 to 10. If this is not specified, the default value is 0. |
| ExtInfo | No | String | Reserved field, used for special purposes. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Task ID. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAigcAudioClone
<Common request parameters>
{
"SubAppId": 221073,
"AudioFileInfo": {
"Type": "Url",
"Url": "https://cg-sdk-1258344699.cos.ap-nanjing.myqcloud.com/personal/jeffgaogao/aigc/output2z.mp3"
},
"VoiceId": "maigua111",
"Text": "Why hasn't Hua Qiang arrived yet",
"PromptAudioFileInfo": {
"Type": "Url",
"Url": "https://cg-sdk-1258344699.cos.ap-nanjing.myqcloud.com/personal/jeffgaogao/aigc/output2z.mp3"
},
"PromptText": "Look, there are no melons in season now. These are all greenhouse melons. You think it's expensive? I think it's expensive too."
"Payload": "mypayload",
"SessionId": "mySessionid",
"SessionContext": "mySessionContext",
"TasksPriority": 10,
"ExtInfo": "myExtInfo"
}
{
"Response": {
"TaskId": "221073-CreateAigcAudioClone-4f736149667baa953315afe87daacad6t",
"RequestId": "dcde7626-cee7-4005-8974-3696244613bf"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InvalidVodUser | The VOD service is not activated. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue.FileId | FileId does not exist. |
| InvalidParameterValue.SubAppId | Parameter value error: app ID. |
| UnauthorizedOperation | Unauthorized operation. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários