Use SubmitVideoTranslationJob to submit video translation tasks and GetSmartHandleJob to retrieve the results. This topic covers the request and response parameters for both operations.
Availability
Translation type | Supported regions |
Subtitle translation | China (Shanghai), China (Beijing), China (Shenzhen), China (Hangzhou), Singapore, US (Silicon Valley) |
Speech translation | China (Shanghai), China (Beijing), China (Shenzhen), China (Hangzhou), Singapore, US (Silicon Valley) |
Lip-sync translation | China (Shanghai), Singapore |
SubmitVideoTranslationJob
To distinguish between translation types, configure the following boolean parameters:
Subtitle translation: Set
NeedSpeechTranslateandNeedFaceTranslatetofalse. Configure subtitle settings inSubtitleTranslate.Speech translation: Set
NeedSpeechTranslatetotrueandNeedFaceTranslatetofalse. Configure speech settings inSpeechTranslate.Lip-sync translation: Set
NeedFaceTranslatetotrueandNeedSpeechTranslatetofalse. Configure lip-sync settings inFaceTranslate.
Parameter | Type | Required | Description |
InputConfig | String | Yes | Input configurations as a JSON string. |
OutputConfig | String | Yes | Output configurations as a JSON string. |
EditingConfig | String | Yes | Translation configurations as a JSON string. |
Title | String | No | Task name. |
Description | String | No | Task description. |
UserData | String | No | Custom information as a JSON string. Maximum length: 512 characters. Supports callback URL configuration. |
InputConfig
Parameter | Type | Required | Description |
Type | String | Yes | Input type. Valid values: |
Video | String | Conditional | Video file ID or URL. Required when |
Audio | String | Conditional | Audio file ID or URL. Required when |
Subtitle | String | Conditional | Subtitle file ID or URL. Required when |
Input type constraints
Translation type | Supported input types |
Subtitle translation ( | Video, Subtitle |
Speech translation ( | Video, Audio |
Lip-sync translation ( | Video only |
OutputConfig
Parameter | Type | Required | Description |
OutputTarget | String | No | Output destination. Default: |
MediaURL | String | Yes | OSS URL in the current Alibaba Cloud account. The path must include the file extension. Supported extensions: |
StorageLocation | String | Conditional | Required when |
FileName | String | Conditional | Required when |
Width | Integer | No | Output video width in pixels. Defaults to the source video width. |
Height | Integer | No | Output video height in pixels. Defaults to the source video height. |
JSONObject | No | Output video configurations such as CRF settings and codec. Example: |
EditingConfig
Parameter | Type | Required | Description |
SourceLanguage | String | Yes | Source language code (for example, |
TargetLanguage | String | Yes | Target language code. Separate multiple languages with commas. Example: |
DetextArea | String | No | Subtitle erasure configuration. If unspecified, source subtitles are retained. Valid values: |
SupportEditing | Boolean | No | Enable post-editing to correct translations. Default: |
BilingualSubtitle | Boolean | No | Generate bilingual subtitles in the output video. Supported by all three translation types. Default: |
SubtitleTranslate | String | No | Subtitle translation configurations as a JSON string. Required for subtitle translation. |
NeedSpeechTranslate | Boolean | No | Enable speech translation. Default: |
SpeechTranslate | String | No | Speech translation configurations as a JSON string. Speech translation runs when |
NeedFaceTranslate | Boolean | No | Enable lip-sync translation. Default: |
FaceTranslate | String | No | Lip-sync translation configurations as a JSON string. Lip-sync translation runs when |
TextSource | String | No | Subtitle source method. |
CustomParameter | String | No | Custom parameters to control video translation effects. |
HotwordLibraryIdList | String | No | Comma-separated IDs of hotword libraries. Example: |
FECanvas | JSON | No | Frontend preview canvas dimensions for adaptive subtitle font scaling. Example: |
To produce an output video without subtitles, set SubtitleTrackClip.FontSize to 0.SourceLanguage valid values
Subtitle translation (TextSource=OCR or OCR_ASR) | Subtitle translation (TextSource=ASR) | External SRT source | Speech translation | Lip-sync translation |
zh (Chinese), en (English) | zh (Chinese), en (English), fr (French), tr (Turkish) | zh, en, ja, ko, yue, de, fr, es, ar, it, az, be, bg, bs, bn, cs, cy, da, et, fa, hi, hbs, hu, id, is, lt, lv, mi, mn, mr, ms, mt, ne, nl, no, pl, pt, ro, ru, sk, sl, sq | Same as External SRT source | Same as External SRT source |
TargetLanguage valid values
Subtitle translation:
zh (Chinese), zh-tw (Traditional Chinese), en (English), ja (Japanese), id (Indonesian), es (Spanish), pt (Portuguese), ar (Arabic), fr (French), tr (Turkish), yue (Cantonese), de (German), ko (Korean), ru (Russian), th (Thai), vi (Vietnamese), ms (Malay)
Chinese dialects: sichuan (Sichuan), dongbei (Northeastern), henan (Henan), shanghai (Shanghai), tianjin (Tianjin), beijing (Beijing), chongqing (Chongqing), hunan (Hunan), taiwan (Hakka Chinese), shanxi (Shanxi), shaanxi (Shaanxi)
Speech translation:
zh (Chinese), zh-tw (Traditional Chinese), en (English), ja (Japanese), ko (Korean), yue (Cantonese), de (German), fr (French), es (Spanish), ar (Arabic), tr (Turkish), ru (Russian), pt (Portuguese), vi (Vietnamese), ms (Malay), th (Thai), id (Indonesian)
Chinese dialects: sichuan (Sichuan), tianjin (Tianjin)
Lip-sync translation:
en (English) only
TextSource valid values
Value | Description | Default for |
| Recognize subtitles through Automatic Speech Recognition (ASR). | - |
| Recognize subtitles through Optical Character Recognition (OCR). Set the recognition area through | Subtitle translation |
| Prioritize OCR. If OCR fails, fall back to ASR. Set the recognition area through | Speech and lip-sync translation |
| Prioritize ASR-transcribed text and timeline, then refine with OCR to correct inaccuracies. Available for subtitle translation only. | - |
| Use an external SRT file specified in | - |
SubtitleTranslate
Parameter | Type | Required | Description |
OcrArea | String | No | OCR recognition area. If unspecified, the subtitle area is automatically detected. Valid values: |
SubtitleConfig | String | No | Output subtitle styling as a JSON string. Parameters follow the SubtitleTrackClip specification in Timeline. Set |
SpeechTranslate
Parameter | Type | Required | Description |
OcrArea | String | No | OCR recognition area. Same format as |
CustomSrtType | String | Conditional | Required if |
SubtitleTimeForce | Boolean | No | Translate only audio within the subtitle time range. Default: |
SubtitleConfig | String | No | Output subtitle styling. Same format as |
OriginalJobId | String | No | Initial task ID for post-editing resubmission. Use the |
SkipSong | Integer | No | Skip translation for sung musical sections. Valid values: |
FaceTranslate
Parameter | Type | Required | Description |
OcrArea | String | No | OCR recognition area. Same format as |
CustomSrtType | String | Conditional | Required if |
SubtitleTimeForce | Boolean | No | Same behavior as |
SubtitleConfig | String | No | Output subtitle styling. Same format as |
SpeechDurationThres | Float | No | Minimum segment duration in seconds for lip-sync processing. Segments shorter than this threshold skip lip-sync. Default: |
FacialClarity | Float | No | Face clarity level. Valid range: 0 to 1. Default: |
SRT format examples
For Chinese-to-English translation:
SourceSrt (source language only):
1
00:00:01,000 --> 00:00:05,000
你好,世界!TargetSrt (target language only):
1
00:00:01,000 --> 00:00:05,000
Hello,World!BilingualSrtSrcFirst (target below source):
1
00:00:01,000 --> 00:00:05,000
你好,世界!
Hello,World!BilingualSrtTgtFirst (source below target):
1
00:00:01,000 --> 00:00:05,000
Hello,World!
你好,世界!CustomParameter
Value | Description |
| Use when the input audio contains multiple languages. For example, in a Korean-to-French translation task, English segments in the input are translated into French. For Chinese-to-English tasks with mixed Chinese and English input, do not use this parameter because the English input is used directly in the output. |
Sample code
Subtitle translation
Subtitle file input
SRT file input is charged based on text translation pricing.
{
"InputConfig": {
"Type": "Subtitle",
"Subtitle": "https://******.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a0720f71eeb755f6f7d6496302/snapshots/sprite/test.srt"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en"
},
"Title": "1735798516693.srt",
"OutputConfig": {
"MediaURL": "https://****.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a0720f71eeb755f6f7d6496302/snapshots/sprite/new.srt"
}
}Video file input
{
"InputConfig": {
"Type": "Video",
"Video": "1628ae20c36******f6f7c77a6302"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"DetextArea": [[0, 0.64, 1, 0.13]],
"BilingualSubtitle": false,
"SubtitleTranslate": {
"OcrArea": [0, 0.64, 1, 0.15],
"SubtitleConfig": {
"Type": "Text",
"FontSize": 95,
"FontColorOpacity": 1,
"Color": "#ffffff",
"X": 0.5,
"Y": 0.686,
"Angle": 0,
"Spacing": 0,
"TextWidth": 0.9,
"Font": "Alibaba PuHuiTi",
"FontColor": "#ffffff",
"FontFace": {
"Bold": false,
"Italic": false,
"Underline": false
},
"SizeRequestType": "RealDim",
"SubtitleEffects": [],
"LineSpacing": 0,
"BorderStyle": 1,
"Outline": 0,
"Alignment": "Center"
}
},
"SupportEditing": true,
"NeedSpeechTranslate": false
},
"Title": "have a test",
"OutputConfig": {
"MediaURL": "https://*****.oss-cn-shanghai.aliyuncs.com/ice-generated/test.mp4"
}
}Video and subtitle file input
{
"InputConfig": {
"Type": "Video",
"Video": "4e92fa60c995*****6f7c77a6302",
"Subtitle": "https://*****.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a072****5f6f7d6496302/snapshots/sprite/test.srt"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"DetextArea": [[0, 0.64, 1, 0.14]],
"BilingualSubtitle": false,
"SubtitleTranslate": {
"OcrArea": "Auto",
"SubtitleConfig": {
"Type": "Text",
"FontSize": 95,
"FontColorOpacity": 1,
"Color": "#ffffff",
"X": 0.5,
"Y": 0.686,
"Angle": 0,
"Spacing": 0,
"TextWidth": 0.9,
"Font": "Alibaba PuHuiTi",
"FontColor": "#ffffff",
"FontFace": {
"Bold": false,
"Italic": false,
"Underline": false
},
"SizeRequestType": "RealDim",
"SubtitleEffects": [],
"LineSpacing": 0,
"BorderStyle": 1,
"Outline": 0,
"Alignment": "Center"
}
},
"SupportEditing": true,
"NeedSpeechTranslate": false
},
"Title": "1735898570421.mp4",
"OutputConfig": {
"MediaURL": "https://****.oss-cn-shanghai.aliyuncs.com/ice-generated/******/snapshots/sprite/1735898570421.mp4"
}
}Speech translation
Video file input
{
"InputConfig": {
"Type": "Video",
"Video": "1628ae20c36******8f6f7c77a6302"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"DetextArea": [[0, 0.64, 1, 0.15]],
"SupportEditing": true,
"BilingualSubtitle": false,
"NeedSpeechTranslate": true,
"SpeechTranslate": {
"SubtitleTimeForce": false,
"SubtitleConfig": {
"Type": "Text",
"FontSize": 95,
"FontColorOpacity": 1,
"Color": "#ffffff",
"X": 0.5,
"Y": 0.686,
"Angle": 0,
"Spacing": 0,
"TextWidth": 0.9,
"Font": "Alibaba PuHuiTi",
"FontColor": "#ffffff",
"FontFace": {
"Bold": false,
"Italic": false,
"Underline": false
},
"SizeRequestType": "RealDim",
"SubtitleEffects": [],
"LineSpacing": 0,
"BorderStyle": 1,
"Outline": 0,
"Alignment": "Center"
}
}
},
"Title": "have a test",
"OutputConfig": {
"MediaURL": "https://******.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a0720f71eeb755f6f7d6496302/snapshots/sprite/1735798757385.mp4"
}
}Video and subtitle file input
{
"InputConfig": {
"Type": "Video",
"Video": "738d94a0ce87******af6f7c6696302",
"Subtitle": "https://********.oss-cn-test.aliyuncs.com/test.srt"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"DetextArea": "Auto",
"SupportEditing": true,
"BilingualSubtitle": false,
"NeedSpeechTranslate": true,
"SpeechTranslate": {
"SubtitleTimeForce": false,
"SubtitleConfig": {
"Type": "Text",
"FontSize": 95,
"FontColorOpacity": 1,
"Color": "#ffffff",
"X": 0.5,
"Y": 0.686,
"Angle": 0,
"Spacing": 0,
"TextWidth": 0.9,
"Font": "Alibaba PuHuiTi",
"FontColor": "#ffffff",
"FontFace": {
"Bold": false,
"Italic": false,
"Underline": false
},
"SizeRequestType": "RealDim",
"SubtitleEffects": [],
"LineSpacing": 0,
"BorderStyle": 1,
"Outline": 0,
"Alignment": "Center"
},
"OcrArea": "Auto",
"CustomSrtType": "SourceSrt"
}
},
"Title": "1736485935837.mp4",
"OutputConfig": {
"MediaURL": "https://*****.oss-cn-***.aliyuncs.com/test.mp4"
}
}Audio file input
{
"InputConfig": {
"Type": "Audio",
"Audio": "2f552010c8d******e7f7f4586303"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"NeedSpeechTranslate": true
},
"Title": "have a test",
"OutputConfig": {
"MediaURL": "https://******.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a0720f***f6f7d6496302/snapshots/sprite/test.wav"
}
}Lip-sync translation
{
"InputConfig": {
"Type": "Video",
"Video": "1628ae20c36******8f6f7c77a6302"
},
"EditingConfig": {
"SourceLanguage": "zh",
"TargetLanguage": "en",
"DetextArea": [[0, 0.64, 1, 0.15]],
"SupportEditing": true,
"BilingualSubtitle": false,
"NeedFaceTranslate": true,
"FaceTranslate": {
"SubtitleConfig": {
"Type": "Text",
"FontSize": 95,
"FontColorOpacity": 1,
"Color": "#ffffff",
"X": 0.5,
"Y": 0.686,
"Angle": 0,
"Spacing": 0,
"TextWidth": 0.9,
"Font": "Alibaba PuHuiTi",
"FontColor": "#ffffff",
"FontFace": {
"Bold": false,
"Italic": false,
"Underline": false
},
"SizeRequestType": "RealDim",
"SubtitleEffects": [],
"LineSpacing": 0,
"BorderStyle": 1,
"Outline": 0,
"Alignment": "Center"
},
"SpeechDurationThres": 1,
"FacialClarity": 1,
"SubtitleTimeForce": false
}
},
"Title": "have a test",
"OutputConfig": {
"MediaURL": "https://******.oss-cn-shanghai.aliyuncs.com/ice-generated/4e1021a0720f71eeb755f6f7d6496302/snapshots/sprite/1735798757385.mp4"
}
}GetSmartHandleJob
AiResult response parameters
Single target language
Category | Parameter | Type | Description |
Common | EditingProjectId | String | Post-editing project ID. |
MediaURL | String | Output media asset URL. | |
MediaId | String | Output media asset ID. | |
DetextVideoURL | String | URL of the subtitle-erased video. | |
DetextVideoMediaId | String | ID of the subtitle-erased video. | |
Subtitle translation | OriginalSubtitleMediaId | String | Source SRT file ID. |
OriginalSubtitleURL | String | Source SRT file URL. | |
TranslatedSubtitleMediaId | String | Translated SRT file ID. | |
TranslatedSubtitleURL | String | Translated SRT file URL. | |
TranslatedText | String | Translated text. | |
TranslatedTextArray | String | Array of translated text for multiple subtitle inputs. | |
Speech translation | SpeechTranslatedSubtitleMediaId | String | SRT file ID for subtitle display in the output video. |
SpeechTranslatedSubtitleURL | String | SRT file URL for subtitle display in the output video. | |
SpeechTranslatedSubtitleURLSigned | String | Signed SRT file URL for subtitle display in the output video. | |
SpeechTranslatedSubtitleMediaIdForFix | String | SRT file ID for translation correction. | |
SpeechTranslatedSubtitleURLForFix | String | SRT file URL for translation correction. | |
SpeechBilingualSubtitleMediaId | String | Bilingual SRT file ID. | |
SpeechBilingualSubtitleURL | String | Bilingual SRT file URL. | |
SpeechTranslationJobId | String | Speech translation task ID for post-editing. | |
TranslatedAudioMediaId | String | Translated audio file ID. | |
TranslatedAudioMediaURL | String | Translated audio file URL. | |
Lip-sync translation | FaceTranslationMediaId | String | Lip-synced video file ID. |
Sample response:
{
"SpeechTranslatedSubtitleURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test1.srt",
"MediaId": "****9cb015bb71f0b96ff7f6d449****",
"TranslatedAudioMediaId": "****df80e79d71efa44ae7f6c449****",
"SpeechTranslatedSubtitleURLForFix": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test2.srt",
"EditingProjectId": "****febec2bf4377b923cf5b1742****",
"DetextVideoURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test3.mp4",
"FaceTranslationMediaId": "****138015bb71f0b96ff7f6d449****",
"SpeechTranslationJobId": "****0c827a664b4f88b33d8d46e3****"
}Multiple target languages
Parameter | Type | Description |
DetextVideoURL | String | URL of the subtitle-removed video. |
DetextVideoMediaId | String | ID of the subtitle-removed video. |
VideoTranslationAiResultMap | JSON | Translation outputs grouped by target language. Each key is a language code (for example, |
VideoTranslationAiResultMap
Category | Parameter | Type | Description |
Common | MediaURL | String | Output media asset URL for the target language. |
MediaId | String | Output media asset ID for the target language. | |
Subtitle translation | OriginalSubtitleMediaId | String | Source SRT file ID. |
OriginalSubtitleURL | String | Source SRT file URL. | |
TranslatedSubtitleMediaId | String | Translated SRT file ID. | |
TranslatedSubtitleURL | String | Translated SRT file URL. | |
TranslatedText | String | Translated text. | |
TranslatedTextArray | String | Array of translated text for multiple subtitle entries. | |
Speech translation | SpeechTranslatedSubtitleMediaId | String | SRT file ID for subtitle display in the output video. |
SpeechTranslatedSubtitleURL | String | SRT file URL for subtitle display in the output video. | |
SpeechTranslatedSubtitleURLSigned | String | Signed SRT file URL for subtitle display in the output video. | |
SpeechTranslatedSubtitleMediaIdForFix | String | SRT file ID for translation correction. | |
SpeechTranslatedSubtitleURLForFix | String | Signed SRT file URL for translation correction. | |
SpeechBilingualSubtitleMediaId | String | Bilingual output ID. | |
SpeechBilingualSubtitleURL | String | Bilingual output URL. | |
SpeechTranslationJobId | String | Speech translation task ID for post-editing. | |
TranslatedAudioMediaId | String | Translated audio file ID. | |
TranslatedAudioMediaURL | String | Translated audio file URL. | |
Lip-sync translation | FaceTranslationMediaId | String | Lip-synced video file ID. |
Sample response
{
"VideoTranslationAiResultMap": {
"en": {
"SpeechTranslatedSubtitleURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test1.srt",
"MediaId": "****4d00087171f0bf81f6f7d44b****",
"TranslatedAudioMediaId": "****df80e79d71efa44ae7f6c449****",
"SpeechTranslatedSubtitleURLForFix": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test2.srt",
"EditingProjectId": "****983759c045c387146888713d****",
"SpeechTranslationJobId": "****33cc65164f13aace55a0f0d3****"
},
"es": {
"SpeechTranslatedSubtitleURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test3.srt",
"MediaId": "****cec0087171f09033f7f6d449****",
"TranslatedAudioMediaId": "****a7f0085671f0bf81f6f7d44b****",
"SpeechTranslatedSubtitleURLForFix": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test4.srt",
"EditingProjectId": "****d16f4a874c4898d254d4b68e****",
"SpeechTranslationJobId": "****f705193c404e9bec19859a11****"
}
},
"DetextVideoURL": "http://[your-bucket].oss-[your-region-id].aliyuncs.com/test5.mp4"
}Scenario examples
Speech translation with post-editing
Correct the generated SRT file and resubmit to refine the translation output.
Lip-sync translation supports corrections to voice output only. Post-editing of lip movements is not available.
Procedure
Submit a speech translation task with
SupportEditingset totrue.{ "InputConfig": { "Type": "Video", "Video": "*****a0052ff71efbfd4e7e6c66*****" }, "OutputConfig": { "MediaURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/video.mp4" }, "EditingConfig": { "SourceLanguage": "zh", "TargetLanguage": "en", "SupportEditing": true, "NeedSpeechTranslate": true } }Retrieve the task result. The response includes:
Field
Description
MediaIdOutput media asset ID.
TranslatedAudioMediaIdTranslated audio file ID.
SpeechTranslatedSubtitleURLTranslated SRT file URL for subtitle display in the output video.
SpeechTranslatedSubtitleURLSignedSigned URL of the translated SRT file.
SpeechTranslatedSubtitleURLForFixSigned URL of the SRT file for translation correction.
SpeechTranslationJobIdSpeech translation task ID. Use this value for
OriginalJobIdin the resubmission.{ "MediaId": "*****d306b6d71efbf98f6f7f55*****", "TranslatedAudioMediaId": "*****d306b6d71efbf98f6f7f5*****", "SpeechTranslatedSubtitleURL": "http://your-bucket.oss-cn-shanghai.aliyuncs.com/video_subtitle_asr_en.srt", "SpeechTranslatedSubtitleURLSigned": "http://your-bucket.oss-cn-shanghai.aliyuncs.com/***.srt", "SpeechTranslatedSubtitleURLForFix": "http://your-bucket.oss-cn-shanghai.aliyuncs.com/***.srt", "SpeechTranslationJobId": "*****74f329d4c03b63e7f7dac8*****" }Download the SRT file from
SpeechTranslatedSubtitleURLForFix, modify the content, and resubmit the task. The system regenerates the output based on the modified subtitles.ImportantThe
InputConfig.Subtitleparameter must contain the manually corrected file, which is the modified version of the file fromSpeechTranslatedSubtitleURLForFix.{ "InputConfig": { "Type": "Video", "Video": "*****a0052ff71efbfd4e7e6c66*****", "Subtitle": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/new_subtitle.srt" }, "OutputConfig": { "MediaURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/video.mp4" }, "EditingConfig": { "SourceLanguage": "zh", "TargetLanguage": "en", "SupportEditing": true, "NeedSpeechTranslate": true, "SpeechTranslate": { "OriginalJobId": "*****b5d5d604916bb898b3066*****", "SubtitleConfig": { "Type": "Text", "FontSize": 95, "FontColorOpacity": 1, "Color": "#ffffff", "X": 0.5, "Y": 0.686, "Angle": 0, "Spacing": 0, "TextWidth": 0.9, "Font": "Alibaba PuHuiTi", "FontColor": "#ffffff", "FontFace": { "Bold": false, "Italic": false, "Underline": false }, "SizeRequestType": "RealDim", "SubtitleEffects": [], "LineSpacing": 0, "BorderStyle": 1, "Outline": 0, "Alignment": "Center" } } } }
Post-editing marks
A subtitle line cannot have both the content and the post-editing mark empty (including spaces and tab characters). To display an empty line without changing the audio, add <--onlymodifytext> to the line.
Mark | Effect | Description |
| Use original audio | Replace the audio within the timestamp range with the original audio from the source video. |
| Use initial translation | Replace the audio within the timestamp range with the initial translation result. |
| Mute speaker | Mute the speaker's voice within the timestamp range. |
| Mute all audio | Mute all audio within the timestamp range. |
| Modify text only | Change the displayed subtitle text without changing the audio. |
SRT file example:
1
00:00:01,000 --> 00:00:03,000
大家好,
<--copy>Hello everyone,
2
00:00:03,500 --> 00:00:06,000
欢迎来到今天的讲座。
<--fsttran>welcome to today's lecture.
3
00:00:07,000 --> 00:00:10,000
我们将讨论未来的技术趋势。
<--mute>We'll discuss the future technology trends.
4
00:00:11,000 --> 00:00:14,000
请大家准备好提问。
<--mute_all>Please get ready to ask questions.
5
00:00:15,000 --> 00:00:18,000
现在让我们开始吧。
<--onlymodifytext>Now, let's get started.Custom hotword libraries
Use EditingConfig.HotwordLibraryIdList to define hotword mappings and improve transcription and translation accuracy.
How it works
A custom hotword library provides:
Define term translations: Specify how particular terms should be translated. For example, map "Intelligent Media Services" to "IMS", or map "YYDS" (Chinese internet slang for "the eternal god") to "The GOAT".
Improve recognition accuracy: Enhance recognition of industry-specific terms, including geographic locations, product names, homophones, and uncommon words.
API reference:
CreateHotwordLibrary: Create a hotword library
ListHotwordLibraries: Query all hotword libraries
GetHotwordLibrary: Query a specific hotword library
UpdateHotwordLibrary: Modify a hotword library
DeleteHotwordLibrary: Delete a hotword library
Code example
References
SubmitVideoTranslationJob: Submit a translation task
GetSmartHandleJob: Retrieve task results
ListSmartJobs: List translation tasks
DeleteSmartJob: Delete a task
Video translation: Video translation user guide
Billing
For pricing details, see Billing of video translation.