The audio segmentation operator is used to extract audio from audio or video files and split the audio into multiple segments according to specified rules, outputting them to a user-defined storage path.
This operator is primarily used for structured processing scenarios involving long audio or video files, such as audio preprocessing, data segmentation, and training data construction. It supports batch concurrent processing and flexible output path organization.
The current version uses TOS storage addresses as both input and output formats. Support for protocols such as HTTP/HTTPS will be added in future versions.
1. Audio/video extraction and segmentation
2. Supports custom segmentation rules
3. Supports custom output audio formats
4. Supports output path templates
5. Supports extended 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
Call the las_audio_extract_and_split operator to extract audio from a video and split it.
Parameter name | Type | Required | Example | Description |
|---|---|---|---|---|
operator_id | string | Yes | las_audio_extract_and_split | The ID of this operator is las_audio_extract_and_split. |
operator_version | string | Yes | v1 | Only v1 is supported currently. |
data | process_param | Yes | Operator parameters |
Parameter name | Type | Example | Description |
|---|---|---|---|
metadata | metadata | Request metadata. | |
data | result | Returned data. |
# Set INPUT_PATH to the TOS path of the video file saved under this account export INPUT_PATH="tos://xxxx/sample.mp4" # Set OUTPUT_PATH_TEMPLATE to a writable TOS path under this account export OUTPUT_PATH_TEMPLATE="tos://xxxx/{index}/test.wav" # Initiate an operator 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_extract_and_split", "operator_version": "v1", "data": { "input_path": "$INPUT_PATH", "output_format": "wav", "output_path_template": "tos://$OUTPUT_PATH_TEMPLATE/{index}/test.wav", "split_duration": 15 } }'
{ "metadata": { "task_status": "COMPLETED", "business_code": "0", "error_msg": "", "request_id": "c7b29d78a99f88beda5497753ed60816" }, "data": { "output_paths": [ "tos://xxx/0/test.wav", "tos://xxx/1/test.wav" ], "metrics": [ { "name": "duration_ms", "value": 26633 } ] } }
HttpCode | Error code | Error message | Description |
|---|---|---|---|
401 | Authorization.Missing | Missing Authorization. | Authorization missing |
401 | ApiKey.Invalid | The api key is invalid. | API is invalid |