This topic describes the parameters of the SubmitVideoTranslationJob operation and provides examples.
Parameters
Parameter | Type | Required | Name | Description |
InputConfig | String | Yes | Input configurations |
|
OutputConfig | String | Yes | Output configurations |
|
EditingConfig | String | Yes | Translation configurations |
|
Title | String | No | Title | |
Description | String | No | Description | |
UserData | String | No | Custom information |
InputConfig
Parameter | Type | Required | Name | Description |
Type | String | Yes | Input type |
|
Video | String | No | The ID or URL of the video file |
|
Audio | String | No | The ID or URL of the audio file |
|
Subtitle | String | No | The ID or URL of the subtitle file |
|
OutputConfig
Parameter | Type | Required | Name | Description |
MediaURL | String | Yes | Output URL |
|
EditingConfig
Parameter | Type | Required | Name | Description |
SourceLanguage | String | Yes | Source language |
|
TargetLanguage | String | Yes | Target language |
|
DetextArea | String | No | Subtitle erasure configurations |
|
SupportEditing | Boolean | No | Secondary editing configurations |
|
SubtitleTranslate | String | No | Subtitle translation configurations |
|
NeedSpeechTranslate | Boolean | No | Speech translation configurations |
|
SpeechTranslate | String | No | Speech translation configurations |
|
SubtitleTranslate
Name | Type | Required | Name | Description |
OcrArea | String | No | OCR area |
|
SubtitleConfig | String | No | Subtitle synthesis configurations |
|
SpeechTranslate
Name | Type | Required | Name | Description |
SubtitleConfig | String | No | Subtitle synthesis Configurations |
|
OriginalJobId | String | No | The ID of the original job. |
|
Scenario
Modify the subtitle file for speech translation
Background information
If you are not satisfied with the result of the speech translation, you can manually modify the subtitle file and submit the modified subtitle file.
Process
Submit the speech translation job. If manual correction is required, you need to set SupportEditing
to true
. The following example shows the parameters.
{
"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
}
}
The following result is returned:
{
"MediaId": "*****d306b6d71efbf98f6f7f55*****",
"TranslatedAudioMediaId": "*****d306b6d71efbf98f6f7f5*****",
"SpeechTranslatedSubtitleURL": "http://your-bucket.oss-cn-shanghai.aliyuncs.com/video_subtitle_asr_en.srt",
"SpeechTranslationJobId": "*****74f329d4c03b63e7f7dac8*****"
}
Parameter description:
MediaId: the ID of the output media asset.
TranslatedAudioMediaId: the ID of the translated audio file.
SpeechTranslatedSubtitleURL: the URL of the translated subtitle file.
SpeechTranslationJobId: the ID of the speech translation job. The OriginalJobId parameter must be specified for manual correction.
If you are not satisfied with the translation result, download the subtitle file from SpeechTranslatedSubtitleURL
, modify the content of the subtitle file, and submit the speech translation job again. The speech translation job regenerates audio based on the modified subtitle file.
Modify only the text content information in the subtitle file, and do not modify the timeline of the subtitles or increase the number of lines.
The following example shows the parameters for the second job, which includes the original video, the corrected subtitle file, and the ID of the original speech translation job:
{
"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*****"
}
}
}