Audio format conversion is used to uniformly convert audio or video files to a specified audio format and output them to a designated storage path.
This operator is primarily used for scenarios such as audio format standardization in data processing pipelines, extracting audio from video, and preparing training data. It supports batch concurrent processing and configurable audio encoding parameters.
Billing standards
Sub-items | Billing standards description |
|---|---|
Billing item | Billing is based on usage calculated from the duration of input audio. |
Billing type | Usage-based billing, unit: |
Unit price | 0.003 CNY/minute |
Billing details
Billing formula: Total cost = unit price * usage
Invoke the las_audio_convert operator to extract audio from video and perform segmentation.
Parameter name | Type | Required | Example | Description |
|---|---|---|---|---|
operator_id | string | Yes | las_audio_convert | The ID of this operator is las_audio_convert. |
operator_version | string | Yes | v1 | Only v1 is supported currently. |
data | AudioConvertReqParams | Yes | Operator parameters |
Parameter name | Type | Example | Description |
|---|---|---|---|
metadata | metadata | Request metadata. | |
data | AudioConvertResponse | Returned data. |
# Please set INPUT_PATH to the TOS path of the video file saved under this account export INPUT_PATH="tos://xxxx/sample.mp4" # Please set OUTPUT_PATH_TEMPLATE to a writable TOS path under this account export OUTPUT_PATH_TEMPLATE="tos://xxxx/{index}/test.wav" # Initiate function service request curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/process" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $LAS_API_KEY" \ --data '{ "operator_id": "las_audio_convert", "operator_version": "v1", "data": { "input_path": "$INPUT_PATH", "output_path": "tos://$OUTPUT_PATH_TEMPLATE/{index}/test.wav", "output_format": "wav" } }'
{ "metadata": { "task_status": "COMPLETED", "business_code": "0", "error_msg": "", "request_id": "c7b29d78a99f88beda5497753ed60816" }, "data": { "audios": [ { "input_path": "tos://xxx/sample.mp3", "output_path": "tos://xxx/sample.mp3.wav4", "duration": 49.711, "status": "success" } ] } }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
401 | Authorization.Missing | Missing Authorization. | Missing authentication |
401 | ApiKey.Invalid | The api key is invalid. | API key is invalid |