tencent cloud

Feedback

Audio and Video Production Progress Query API

Last updated: 2024-07-18 18:20:46

API Description

You can query the progress and results of a task using taskId. When the progress field in the return value reaches 100, you can use MediaUrl to obtain the download link for the final audio and video. For video production tasks, the SubtitlesUrl field will also be returned to retrieve the final SRT subtitle address. Audio and video resources without a custom storage URL are retained for only 7 days.

Calling Protocol

HTTPS + JSON
POST     /v2/ivh/videomaker/broadcastservice/getprogress
Header Content-Type: application/json;charset=utf-8

Request Parameters

Parameters
Type
Mandatory
Description
TaskId
string
Yes

Response Parameter

Parameters
Type
Mandatory
Description
Progress
int
Yes
Production progress ranges from -1 to 100: -1 indicates generation failure, and 100 indicates successful generation (reserved field, currently not for reference).
MediaUrl
string
Yes
Audio and video result address
SubtitlesUrl
string
No
The corresponding SRT subtitle address for the video is returned in video production.
Status
string
Yes
Production Status
"COMMIT": Submitted and awaiting to queue
"MAKING": In production
"SUCCESS": Production succeeded
"FAIL": Production failed
ArrayCount
int
Yes
The number of tasks queued before this task when the Status is "COMMIT"
FailCode
int
No
The error code returned when the production failed
FailMessage
string
No
Failure reasons returned when production fails which facilitate troubleshooting
TextTimestampResult
Array of [Sentence]
No
This field returns the text timestamp information for the TTS preview task.
Duration
int
Yes
Video duration, in milliseconds.
Sentence
Parameters
Type
Mandatory
Description
Sentence
string
Yes
Sentences derived from sentence splitting
Words
Array of [Word]
Yes
Information about each word in the sentence
Word
Parameters
Type
Mandatory
Description
Word
string
Yes
One character in the sentence
StartTimestamp
long
Yes
The starting time point of that character, and the value is divided by 10,000 represents milliseconds (equivalent to 0.1 microseconds).
EndTimestamp
long
Yes
The ending time point of that character, and the value is divided by 10,000 represents milliseconds (equivalent to 0.1 microseconds).

Request Sample

{
"Header": {},
"Payload": {
"TaskId": 123
}
}

Response Sample

{
"Header": {
"Code": 0,
"Message": "",
"RequestID": "123"
},
"Payload": {
"Progress": 100,
"MediaUrl": "url",
"SubtitlesUrl": "",
"ArrayCount": 0,
"FailMessage": "",
"Duration": 11810,
"FailCode": 0,
"TextTimestampResult": [
{
"Sentence": "How are you doing, virtual anchor?",
"Words": [
{
"Word": "how",
"EndTimestamp": 6100000,
"StartTimestamp": 4500000
},
{
"Word": "are",
"EndTimestamp": 8200000,
"StartTimestamp": 6100000
},
{
"Word": "you",
"EndTimestamp": 9700000,
"StartTimestamp": 8200000
},
{
"Word": "doing",
"EndTimestamp": 11100000,
"StartTimestamp": 9700000
},
{
"Word": "virtual",
"EndTimestamp": 12900000,
"StartTimestamp": 11100000
},
{
"Word": "anchor",
"EndTimestamp": 16000000,
"StartTimestamp": 12900000
}
]
}
]
}
}
 

Catalog

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon