You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Audio transcoding
GetAudioConvertJob
Copy page
Download PDF
GetAudioConvertJob
Description​
This interface is used to query audio transcoding tasks.​
Notes​
When using a sub-account, it must have the relevant permissions required for GetDataProcessJob data processing.​
Request syntax​
​
GET /?job_type=AudioConvert&job_id=183535129563a53bfa71000188********** HTTP/1.1​
Host: <bucket_name>.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Authorization: <authorization_string>​
​
Request parameters and headers ​
​
Field name​
​
Type​
Required​
Example value​
Description​
job_id​
Query​
String​
Yes​
183535129563a53bfa71000188**********​
Audio transcoding task ID.​
job_type​
Query​
String​
Yes​
AudioConvert​
Task type, for audio transcoding scenarios, the value is only AudioConvert.​
​
Request body elements​
No elements are used.​
Response headers​
The response contains common headers. For more information, see Common parameters.​
Response body elements​
​
Name​
Type​
Example value​
Description​
JobID​
String​
fa81ef2a00a2211f08a9aa5**********​
Task ID.​
CreateTime​
String​
2025-03-26T17:14:01+0800​
Time when the task is created.​
StartTime​
String​
2025-03-26T17:14:02+0800​
Task start time.​
EndTime​
String​
2025-03-26T17:14:02+0800​
Task end time.​
State​
String​
Success​
Task status.​
Code​
Integer​
0​
Task status code.​
Message​
String​
Success​
Task status message.​
Input​
Container​
-​
Input file.​
Object​
String​
​
sample.mp4​
Name of the input file object.​
Parent node: Input.​
AudioConvertConfig​
Container​
-​
Audio transcoding task details.​
ContainerFormat​
String​
mp3​
Specify the transcoding container format, the value list is as follows:​
  • wav​
  • mp3​
  • aac​
  • flac​
  • oga​
  • ac3​
  • opus​
Parent node: AudioConvertConfig.​
TimeInterval​
Container​
-​
Specify the transcoding duration.​
Parent node: AudioConvertConfig.​
Start​
Integer​
0​
Start time in milliseconds, default is 0.​
Parent node: TimeInterval.​
Duration​
Integer​
1000​
Duration in milliseconds. The default value of 0 means the video length.​
Parent node: TimeInterval.​
BitRate​
Integer​
8000​
Audio bitrate, range [8000, 1000000]. If set to 0, the original audio bitrate is used. Some containers do not support specifying bitrate.​
tip​
The number of supported audio channels varies by format. See Support for different audio container parameters for details.​
Parent node: AudioConvertConfig.​
BitRateOpt​
Integer​
0​
Audio bitrate options. The options are as follows:​
  • 0 (default): always use the target audio bitrate.​
  • 1: use the source audio bitrate if it is lower than BitRate.​
  • 2: fail if the source audio bitrate is lower than BitRate.​
Parent node: AudioConvertConfig.​
SampleFormat​
Integer​
-​
Audio sample format, with different ranges depending on the container.​
Parent node: AudioConvertConfig.​
tip​
Supported sample rates vary by format. See Sample Rate Support for Different Audio Containers for details.
SampleRate​
Integer​
48000​
Audio sampling rate, with different value ranges depending on the container.​
parent node: AudioConvertConfig.​
tip​
sampling rates supported vary by format; see sampling rate support for different audio containers for details.
Channels​
Integer​
2​
Number of audio channels varies by container type.​
Parent node: AudioConvertConfig.​
tip​
The supported number of channels varies by format; see Supported audio container parameters for details.
Output​
Container​
-​
Output file.​
Region​
String​
cn-beijing​
Region where the output file bucket is located Region.​
Parent node: Output.​
Bucket​
String​
testbkt​
Output file bucket name.​
Parent node: Output.​
Object​
String​
output.mp4​
Output file object name.​
Parent node: Output.​
​
Sample request​
​
GET /?job_type=AudioConvert&job_id=183535129563a53bfa71000188********** HTTP/1.1​
Host: <bucket_name>.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 08:05:36 +0000​
Authorization: <authorization_string>​
​
Sample response​
​
HTTP/1.1 200 OK​
Date: Fri, 30 Jul 2021 13:53:55 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
​
{​
"JobID": "fa81ef2a00a2211f08a9aa5**********",​
"CreateTime": "2025-03-26T17:14:01+0800",​
"StartTime": "2025-03-26T17:14:02+0800",​
"EndTime": "2025-03-26T17:14:02+0800",​
"State": "Success",​
"Code": 0,​
"Message": "success",​
"Input" : { // Source file​
"Object" : "sample.wav" ​
},​
"AudioConvertConfig": {​
"ContainerFormat": "mp3",​
"TimeInterval": {​
"Start": 0,​
"Duration": 1000​
},​
"BitRate": 8000,​
"BitRateOpt": 0,​
"SampleFormat": "",​
"SampleRate": 48000,​
"Channels": 2​
},​
"Output" : { // Output file​
"Region" : "cn-beijing", ​
"Bucket" : "testbkt",​
"Object" : "output.mp3"​
}​
}​
​
​
Last updated: 2026.04.09 15:27:10