调用 DescribeSubtitleTranscodePresetDetail,查询指定字幕配置的详情。
请求频率:单用户请求频率限制为 10 次/秒。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | DescribeSubtitleTranscodePresetDetail | 接口名称。当前 API 的名称为 DescribeSubtitleTranscodePresetDetail。 |
| Version | String | 是 | 2023-01-01 | 接口版本。当前 API 的版本为 2023-01-01。 |
| 参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| PresetList | Array of String | 是 | ["igx**dqjks","iga**dqjks"] | 字幕配置的名称,您可以调用 ListVhostSubtitleTranscodePreset 接口,通过 PresetName 获取字幕配置名称。 |
下表仅列出本接口特有的返回参数。更多信息请见返回结构。
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| PresetDetailList | Array of PresetDetailList | - | 字幕配置详情。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| PresetName | String | igxxjdqjks | 字幕配置的名称。 |
| Status | Integer | 1 | 已废弃。 |
| Description | String | subtitleconfig001 | 字幕配置的描述信息。 |
| SuffixName | String | _subtitle | 字幕后缀。例如字幕流地址为 rtmp://pull.example.com/live/test_subtitle,则字幕后缀为 _subtitle。 |
Delay | Integer |
| 播出延迟时长,以保证同传声音和字幕的翻译处理完成。单位为秒。 说明
|
DisplayPreset | String |
| (不推荐使用)预设效果,用于快速配置。
|
MaxRowNumber | Integer |
| 每种语言字幕最多显示的行数。取值如下:
说明
|
Position | Object of Position |
| 字幕位置。 说明 如传入 |
| SIConfig | Object of SIConfig | - | 声影同传模式配置。 |
| SourceLanguage | Object of SourceLanguage | - | 原文字幕配置。 |
| TargetLanguage | Array of TargetLanguage | - | 译文字幕配置。 |
HotWordList | Array of String |
| 热词列表。 说明 仅原文 ASR 字幕生效。 |
GlossaryWordList | Array of String |
| 关键词列表。 说明 仅字幕翻译和同传声音生效。 |
ReplaceMap | JSON Map |
| 易错词列表。 |
| CreatedAt | Integer | 1779335505 | 字幕配置的创建时间。Unix 时间戳,单位为秒。 |
| UpdatedAt | Integer | 1779435505 | 字幕配置的更新时间。Unix 时间戳,单位为秒。 |
| SubtitleTosConfig | Object of SubtitleTosConfig | - | TOS 配置,用于生成字幕 SRT 文件。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Relative | String |
| 字幕在画面中的位置。取值如下:
|
MarginVertical | Float |
| 字幕的上下边距,即字幕距离画面顶部或底部的距离。取值为画面高度的百分比,取值范围为
|
| MarginHorizontal | Float | 0.2 | 字幕的左右边距,即字幕距离画面左右边缘的距离。取值为画面宽度的百分比,取值范围为 (0, 0.3]。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Enable | Boolean |
| 是否开启声影同传模式。取值如下:
|
Pipe | String |
| 声影同传类型。取值如下:
|
SpeakerRecognition | Integer |
| 是否开启同传声音功能。取值如下:
说明 仅在 |
DigitalHumanMouthShape | Boolean |
| 是否开启数字人口型功能。取值如下:
说明
|
PipeExtra | String |
| 额外配置,为 JSON 格式的字符串,包含音量均衡、降噪、原声音量等信息。详见 CreateSpeechTask 接口的 说明 仅在 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Display | Boolean |
| 是否展示原文字幕,取值如下:
|
Language | String |
| 原文字幕语言。
|
ShowPriority | Integer |
| 原文字幕的展示优先级。 |
MaxCharNumber | Integer |
| 原文每行字幕的最大字符数。 说明
|
Font | String |
| 原文字幕字体。
|
FontSize | Integer |
| 原文字幕字号。单位为 px。 说明 如传入 |
FontColor | String |
| 原文字幕的字体颜色。
说明
|
| Border | Object of Border | - | 原文字幕字体阴影。 |
| Box | Object of Box | - | 原文字幕字体背景。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Language | String |
| 译文字幕语言。
|
ShowPriority | Integer |
| 译文字幕的展示优先级。 |
MaxCharNumber | Integer |
| 译文每行字幕的最大字符数。 说明
|
Hidden | Boolean |
| 是否隐藏译文字幕。取值如下:
|
Font | String |
| 译文字幕的字体。
|
FontSize | Integer |
| 译文字幕字号。单位为 px。 说明 如传入 |
FontColor | String |
| 译文字幕的字体颜色。
说明
|
| Border | Object of Border | - | 译文字幕字体阴影。 |
| Box | Object of Box | - | 译文字幕字体背景。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Enable | Boolean |
| 是否生成字幕 SRT 文件。取值如下:
|
| Bucket | String | bucketa | 存储字幕 SRT 文件的 TOS 桶名称。 |
Region | String |
| 存储字幕 SRT 文件的 TOS 桶区域。取值如下:
|
| StorageDir | String | FolderA | 存储字幕 SRT 文件的 TOS 桶文件夹名称。 |
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Width | Float | 2 | 宽度。单位为 px。 |
Color | String |
| 颜色。
说明
|
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| W | Float | 1.0 | 宽度。单位为 px。 |
Color | String |
| 颜色。
说明
|
POST https://live.volcengineapi.com?Action=DescribeSubtitleTranscodePresetDetail&Version=2023-01-01 { "PresetList": [ "igx**dqjks", "iga**dqjks" ] }
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "DescribeSubtitleTranscodePresetDetail", "Version": "2023-01-01", "Service": "live", "Region": "cn-north-1" }, "Result": { "PresetDetailList": [ { "PresetName": "igxxjdqjks", "Status": 1, "Description": "subtitleconfig001", "SuffixName": "_subtitle", "Delay": 8, "DisplayPreset": "small", "MaxRowNumber": 0, "Position": { "Relative": "top", "MarginVertical": 0.5, "MarginHorizontal": 0.2 }, "SourceLanguage": { "Display": true, "Language": "zh", "Font": "siyuanheiti", "FontSize": 18, "Border": { "Width": 2, "Color": "0xFF0000@0.5" }, "FontColor": "0xFF0000@0.5", "ShowPriority": 2, "MaxCharNumber": 60, "Box": { "W": 1, "Color": "0xFF0000@0.5" } }, "TargetLanguage": [ { "Language": "en", "Font": "inter", "FontSize": 18, "FontColor": "0xFF0000@0.5", "Border": { "Width": 2, "Color": "0xFF0000@0.5" }, "ShowPriority": 1, "MaxCharNumber": 60, "Hidden": true, "Box": { "W": 1.0, "Color": "0xFF0000@0.5" } } ], "HotWordList": [ "视频直播", "赛事直播", "智能家居" ], "GlossaryWordList": [ "字节跳动:ByteDance", "视频直播:MediaLive" ], "CreatedAt": 1779335505, "UpdatedAt": 1779435505, "SubtitleTosConfig": { "Enable": true, "Bucket": "bucketa", "Region": "cn-beijing", "StorageDir": "FolderA" }, "SIConfig": { "Enable": true, "Pipe": "mix", "SpeakerRecognition": 1, "DigitalHumanMouthShape": false, "PipeExtra": "{\"Separator\":{\"HandleType\":1},\"Amix\":{\"AudioEnhance\":false}}" }, "ReplaceMap": { "蒂姆": "Tim", "提姆": "Tim" } } ] } }
下表仅列出本接口特有的错误码。更多信息请参见公共错误码获取详细信息。
| 状态码 | 错误码 | 错误信息 | 说明 |
|---|---|---|---|
| 200 | CommonErr | - | 未分类错误。建议重试,如果仍返回该错误码,请联系技术支持。 |
| 400 | InvalidParam | - | 输入的参数无效或不符合要求,请参照请求参数说明进行检查。 |
| 400 | InvalidParam.BindError | Request parameter error, please check input data | 参数未通过校验,请检查参数类型是否正确。 |
| 403 | RequestForbidden | - | 请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。 |
| 403 | RequestForbidden.AccountIDNotAllowed | this AccountID does not have permission to access the corresponding resource, please check the request parameters | 请求被拒绝,当前账号下无请求的资源(域名空间、域名、应用、配置模版、证书)。 |
| 403 | RequestForbidden.BillingStatus | Billing status is not available for the AccountID, please activate the service or recharge. | 未开通视频直播服务或账号欠费,造成账单不可用,请检查服务开通情况和账号欠费情况。 |
| 404 | ResourceNotFound | - | 未找到资源(域名空间、域名、应用、配置模版、证书)。建议重试,如果仍返回该错误码,请联系技术支持。 |
| 404 | ResourceNotFound.VhostNotExist | vhost not found | 未找到域名空间(Vhost)。请检查传入的域名空间是否与实际使用的域名空间一致。 |
| 500 | InternalError | an internal error occurred, please contact the administrator. | 出现内部错误,请联系技术支持。 |
| 500 | InternalError.DB | an internal error related to database occurred, please contact the administrator. | 出现与数据库相关的内部错误,请联系技术支持。 |
| 500 | InternalError.VhostOrDomain | an internal error related to vhost or domain occurred, please contact the administrator. | 出现与域名空间(Vhost)或域名(Domain)相关的内部错误。请联系技术支持。 |
| 502 | InternalServiceError | an internal error occurred, please contact the administrator. | 服务间出现错误,请联系技术支持。 |
| 502 | InternalServiceError.BadResponse | an internal error occurred, please contact the administrator. | 服务间出现错误,请联系技术支持。 |
| 504 | InternalServiceTimeout | Internal Service is timeout. please contact the administrator. | 内部服务超时,请联系技术支持。 |