SubmitASRJob
Extracts the start and end timestamps and the corresponding text from video audio.
Operation description
This operation is an asynchronous operation. After you commit a node, a node ID is returned. The node is not completed at this time, enters the background queue, and will execute asynchronously. The final result is notified through a callback. You can also call the Retrieve smart task result operation to actively query the node status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitASRJob |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InputFile |
string |
No |
The input configuration. OSS URLs and content library material IDs are supported. |
oss://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| UserData |
string |
No |
The custom settings. You can pass in customer business information, such as the business environment and job information, in JSON string format. |
{ "user": "data", "env": "prod" } |
| Title |
string |
No |
The job title. The maximum length is 128 bytes. |
Test title |
| Description |
string |
No |
The job description. The maximum length is 128 bytes. |
Test description |
| StartTime |
string |
No |
The start time. |
00:00:00 |
| Duration |
string |
No |
The duration. |
00:00:10 |
| EditingConfig |
string |
No |
The audio speech-to-text configuration:
|
{ "HotwordLibraryIdList": "******2609a14f54a0636b7e16******" } |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******11-DB8D-4A9A-875B-275798****** |
| JobId |
string |
The smart job ID. |
****20b48fb04483915d4f2cd8ac**** |
| State |
string |
The job status. Valid values:
|
Finished |
You can use the job ID of an ASR job to call the Query smart task results operation to query the detailed execution information of the ASR job. The following example shows the response returned by the Query smart task results operation when the job is executed successfully.
{
"RequestId": "******2D-443C-5043-B0E4-867070******",
"JobResult": {
"AiResult": "[{\"content\":\"mentioning\",\"from\":0.0,\"to\":0.846},{\"content\":\"Now it can be said that it is red and purple\",\"from\":0.846,\"to\":3.386},{\"content\":\"Often the ticket price is very high\",\"from\":3.386,\"to\":4.402},{\"content\":\"But as soon as he started, he was robbed\",\"from\":4.402,\"to\":6.265},{\"content\":\"I also participated in various crosstalk variety shows to comment on the new performers\",\"from\":6.265,\"to\":10.33}]"
},
"State": "Finished",
"Output": "[{\"content\":\"mentioning\",\"from\":0.0,\"to\":0.846},{\"content\":\"Now it can be said that it is red and purple\",\"from\":0.846,\"to\":3.386},{\"content\":\"Often the ticket price is very high\",\"from\":3.386,\"to\":4.402},{\"content\":\"But as soon as he started, he was robbed.\",\"from\":4.402,\"to\":6.265},{\"content\":\"I also participated in various crosstalk variety shows to comment on the new performers\",\"from\":6.265,\"to\":10.33}]",
"JobId": "******042d5e4db6866f6289d1******",
"SmartJobInfo": {
"JobType": "ASR",
"ModifiedTime": "2022-01-21T06:15:08Z",
"UserId": 1234562230123456,
"CreateTime": "2022-01-21T06:15:02Z",
"Title": "default_title_2022-01-21T06:15:02Z",
"InputConfig": {
"JobParameters": "{\"duration\":\"00:30:00\",\"start_time\":\"00:00:00\",\"request_params\":\"&enable_word_level_result=true\"}",
"InputFile": "oss://your-bucket.oss-cn-shanghai.aliyuncs.com/your-video.mp4"
}
}
}
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****",
"State": "Finished"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.