Domain name for API request: mps.intl.tencentcloudapi.com.
This API is used to create a custom smart subtitle template.
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: CreateSmartSubtitleTemplate. |
Version | Yes | String | Common Params. The value used for this API: 2019-06-12. |
Region | No | String | Common Params. This parameter is not required for this API. |
Name | Yes | String | Smart subtitle template name. Length limit: 64 characters. |
VideoSrcLanguage | Yes | String | Source language of the video with smart subtitles. Supported languages: zh: Simplified Chinese en: English ja: Japanese ko: Korean zh-PY: Chinese-English-Cantonese zh-medical: Medical Chinese yue: Cantonese vi: Vietnamese ms: Malay id: Indonesian fli: Filipino th: Thai pt: Portuguese tr: Turkish ar: Arabic es: Spanish hi: Hindi fr: French de: German zh-dialect: Chinese dialect |
SubtitleType | Yes | Integer | Smart subtitle language type. 0: source language1: target language 2: source language + target language The value can only be 0 when TranslateSwitch is set to OFF.The value can only be 1 or 2 when TranslateSwitch is set to ON. |
Comment | No | String | Smart subtitle template description. Length limit: 256 characters. |
SubtitleFormat | No | String | Smart subtitle file format. vtt: WebVTT format If this field is left blank, no subtitle file will be generated. |
AsrHotWordsConfigure | No | AsrHotWordsConfigure | ASR hotword lexicon parameter. |
TranslateSwitch | No | String | Subtitle translation switch. ON: enable translation OFF: disable translation |
TranslateDstLanguage | No | String | Target language for subtitle translation. This field takes effect when TranslateSwitch is set to ON. Supported languages: zh: Simplified Chinese en: English ja: Japanese ko: Korean fr: French es: Spanish it: Italian de: German tr: Turkish ru: Russian pt: Portuguese vi: Vietnamese id: Indonesian ms: Malay th: Thai ar: Arabic hi: Hindi |
Parameter Name | Type | Description |
---|---|---|
Definition | Integer | Unique identifier of the smart subtitle template. |
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: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateSmartSubtitleTemplate
<Common request parameters>
{
"Name": "Example"
"VideoSrcLanguage": "zh",
"SubtitleType": 0
}
{
"Response": {
"Definition": 202281,
"RequestId": "42dc919b-2ec7-412c-85f0-88f003813d04"
}
}
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 |
---|---|
InvalidParameterValue.AsrHotWordsConfigure | The value of the hotword lexicon configuration parameter is incorrect. |
InvalidParameterValue.AsrHotWordsLibraryId | The value of the hotword lexicon ID parameter is incorrect. |
InvalidParameterValue.AsrHotWordsSwitch | The value of the hotword lexicon switch parameter is incorrect. |
InvalidParameterValue.Comment | Parameter error: template description. |
InvalidParameterValue.Name | Incorrect parameter value: Name exceeds the length limit. |
InvalidParameterValue.SubtitleFormat | Incorrect parameter value: The value of the SubtitleFormat parameter is invalid. |
InvalidParameterValue.SubtitleType | The value of the subtitle language type is incorrect. |
InvalidParameterValue.TranslateDstLanguage | The value of the target language parameter is incorrect. |
InvalidParameterValue.TranslateSwitch | The value of the translation switch parameter is incorrect. |
InvalidParameterValue.VideoSrcLanguage | The value of the video source language parameter is incorrect. |