# Function Description
To build task of transcoding or composing with task scheduling in background server
# Request
# request example
POST /job/create
Host: <host>
Content-Type: application/json
# Request Headers
none
# Request Parameters
none
# Request Body
request body is JSON character string,for example:
{
"uuid": "uuid",
"type": 0,
"data": {
"url": "...",
"licUrl": "....",
"callbackHost": "...",
"resourceType": 1,
"isDir": false,
"isSingleSlice": false,
"isAlpha": false,
"resourceNames": [
'name-00000.tga',
...,
'name-00009.tga'
],
"compareAudioUrl": "http://.....",
"trimIn": 1234,
"trimOut": 2345,
"maxWordLength": 24,
"onlyTranscodeThumbnail": false,
"pathPrefix": "9999",
"reviewPrefix": "https://www.baidu.com"
}
}
Field | Type | Explain | Mandatory |
---|---|---|---|
uuid | string | task uuid | true |
type | int | task type 0-transcoding 1- composing 4- videos alignment 5-sentences segmentation | true |
data | object | task data | true |
url | string | -- it is url of video-audio if task type is transcoding -- it is url of project file if task type is compiling -- it is a url of one of two audio if task type is audio alignment -- it is json content of audio transcript if task type is sentences segmentation,and format is [ { "bg": "0", //start-time "ed": "1850", //end-time "onebest": "...", // the content wait for spliting "speaker": "0" //ignore } ... ] | true |
licUrl | String | if the task is installing special effects,and lic url is required. | true |
callbackHost | string | Host of callbacking | true |
resourceType | int | task resource type 1.video 2.audio 3.image 4 audio transcoding | it is mandatory field when transcoding |
isDir | boolean | directory or not | false |
isSingleSlice | boolean | SingleSlice video or not | false |
isAlpha | boolean | transcoding alpha video or not | false |
resourceNames | array | resource file list of directory | false |
compareAudioUrl | string | url of one of two audio which need to align | it is mandatory field when transcoding when audio alignment |
maxWordLength | Integer | The words spliter will segment long sentences with more words than this value | false |
trimIn | Long | start time of audio transcoding,in microsecond | false |
trimOut | Long | end time of audio transcoding,in microsecond | false |
onlyTranscodeThumbnail | boolean | transcoding task generate thumbnail only | false |
pathPrefix | string | similar with muti-tenant concept,and upload resource to this directory Do not start the character string with "/" For local NAS storage, if you want to customize the path of transcoding resource storage, you need to start with "/" and use it together with the reviewPrefix field | false |
reviewPrefix | string | domain name of Cloud storage,and keep same between bucket of domain name and project,and it should according to pathPrefix for example:hoped pathPrefix is "/test/159",original domain name is "https://test.com" so this configuration"https://test.com (opens new window)/test/159",you can specify pathPrefix without transmitting pathPrefix. | false |
# Response
# Response Header
No special response header
# Response Body
{
"code": 0,
"msg": "success"
}
# specification
The task type of speech recognition is 2. This task cannot be initiated through this interface, so it is not listed in the type of the request body.The reason is that the speech recognition process involves multiple tasks.
- Firstly, call the task scheduler according to the trimin and trimout of the front end to start the transcoding service and get the audio files in this time period
- The user invokes the third-party capability (iFLYTEK, etc.) to realize the process of generating text according to audio
- The generated text is generally long and may be larger than one line at the front end. At this time, it is necessary to call the task scheduler to initiate a word segmentation task to divide the long sentence into short sentences
- Finally, return the short sentence after sentences segmentation to the frontend
Therefore, the creation of speech recognition task is not provided