Audio slicing
The audio slicing operator splits long audio files into shorter segments based on sound activity or conversational turns. It processes only audio objects from the input dataset and automatically ignores non-audio objects. This topic describes how to configure the audio slicing operator.
Prerequisites
-
To use the workflow feature, you must first purchase the unstructured data feature for your instance.
-
You must have a workflow. For more information, see Create and manage a workflow.
Permissions
In a Basic project, project administrators, developers, analysts, and users assigned a custom project role with Dataset-Usage permissions can use all datasets within the project as the operator's input and output datasets.
Supported file formats
The audio slicing operator supports the following file formats: mp3, mov, avi, mkv, m4a, and wav.
Procedure
-
In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.
-
In the top navigation bar of the Develop page, select a Project.
-
In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click your target workflow to open its canvas. Drag the Audio Slicing operator from the Operator Library on the left to the canvas. In the Audio Slicing pane on the right, configure the following parameters.
Parameter
Description
Step name
Enter a name for the operator. The name can contain any character and be up to 256 characters long.
Input configuration
Dataset
Select the dataset to process. You can select only a hybrid dataset. After you select a dataset, you must also select its version. By default, the first version in ascending order is selected.
If this is a downstream operator, the selected dataset is typically the output of the upstream operator.
Input field
The storage URL of the audio file to be processed. Select a source field from the input dataset. You can select only fields whose Is URL parameter is set to Yes in the input dataset.
Filter condition (Optional)
Use SQL syntax to enter the filter condition that follows the
WHEREclause. You can use system-wide global variables, such as the business date${bizdate}.Operator parameter configuration
Slicing method
-
Slice by Sound: Splits audio based on volume and silence intervals, regardless of the audio content. This method is suitable for clean audio without background noise because it cannot separate vocals from music. This method is selected by default.
If you select this method, you also need to configure Volume Threshold (dB), Minimum Length (ms), Minimum Interval (ms), Frame-by-Frame Detection Step (ms), and Maximum Silence Retention Length (ms).
-
Slice by Conversation: Uses a speech recognition model to detect the start and end timestamps of speech, splitting the audio by conversational turns and distinguishing between spoken and non-spoken segments. This method is suitable for dialog-style audio such as meetings, interviews, and customer service calls. Background music and ambient noise do not affect detection.
If you select this method, you also need to configure Model, Minimum Duration of Conversation Segment, and Output Method.
Volume threshold (dB)
Controls the sensitivity of silence detection. Lower values make the operator more sensitive to silence. You can enter an integer from -60 to -20. The default value is -40.
NoteThis parameter is available only when Slicing Method is set to Slice by Sound.
Minimum length (ms)
The minimum duration of each audio segment. You can enter an integer from 1000 to 10000. The default value is 5000.
NoteThis parameter is available only when Slicing Method is set to Slice by Sound.
Minimum interval (ms)
The minimum length of a silent segment that can trigger a slice. You can enter an integer from 100 to 1000. The default value is 300.
NoteThis parameter is available only when Slicing Method is set to Slice by Sound.
Frame-by-frame detection step (ms)
A smaller value increases accuracy, while a larger value increases processing speed. You can enter an integer from 5 to 50. The default value is 10.
NoteThis parameter is available only when Slicing Method is set to Slice by Sound.
Maximum silence retention length (ms)
This parameter defines how much silence is retained in the resulting segments when a long silent interval is detected. A smaller value produces more precise cuts, while a larger value retains more silence for a smoother transition. You can enter an integer from 0 to 2000. The default value is 500.
NoteThis parameter is available only when Slicing Method is set to Slice by Sound.
Model
Select a model to process the data. You can select a model that is Enabled and is of the Audio (Voice Activity Detection) type in Intelligent Application Management > Model Configuration.
Note-
This parameter is available only when Slicing Method is set to Slice by Conversation.
-
For information about the pricing factors of system models, see Built-in models supported by Intelligent Application.
-
If you have purchased a premium license package for your own model, no Credits are deducted. Otherwise, you are charged based on a pricing factor of 0.2x.
Minimum duration of conversation segment
The minimum duration of a single conversation segment, in seconds. The default value is 5 seconds. Shorter segments are merged with adjacent ones to avoid creating fragments without context.
NoteThis parameter is available only when Slicing Method is set to Slice by Conversation.
Output method
-
Spoken Segments Only: Outputs only the segments that contain speech. This can significantly reduce the number of slices and storage usage. This is the default method.
-
All: Outputs all segments, including non-spoken segments.
NoteThis parameter is available only when Slicing Method is set to Slice by Conversation.
Output configuration
Dataset
Select a hybrid dataset as the output dataset. After you select a dataset, you must also select its version. By default, the first version in ascending order is selected. You can also select other versions of the source dataset.
Sliced file directory
The path prefix is fixed to the selected dataset's storage directory. You can specify a subdirectory, but each source audio file must be stored in a separate subdirectory.
Load policy
The default policy is Update on Primary Key Conflict if the output dataset's metadata table has a primary key; otherwise, the default is Append Data.
-
Append Data: Appends new data directly to the destination table. An error is reported if a primary key or constraint conflict occurs.
-
Update on Primary Key Conflict: If a primary key or constraint conflict occurs, the existing row with the duplicate primary key is deleted before the new data is inserted.
-
Overwrite: Deletes all data from the destination table before writing the new data.
Field mapping
The audio slicing operator outputs the following fixed fields:
-
source_file_url: The URL of the original long audio input file. -
sequence: The sequence number. -
file_url: The URL of the sliced audio file. -
audio_id: The unique ID of the sliced audio file, used for unique identification by downstream operators. -
start_time: The start time of the slice in the original audio, in seconds. -
end_time: The end time of the slice in the original audio, in seconds.
In real-time and online workflows, the audio slicing operator uses a 1:N output model, where a single input event produces multiple audio fragments. The slicing results are stored in the
audio_slicesarray field, which can be used as the source for a ForEach operator to pass each audio fragment to downstream operators for individual processing. The iteration variable for the ForEach operator defaults toaudio_slice.By default, the operator's output fields are mapped to fields of the same name in the output dataset. You can also manually select target fields for custom mapping. In addition, you can map pass-through fields from the source dataset to the target dataset. You can manage field mappings with the following options:
-
Add Output Field: Click to add a new, empty field mapping row.
-
Batch Mapping: Click to perform batch manual mapping, map fields by name, or map fields by row position.
-
Delete: Click the Delete icon to delete a field mapping row. You cannot delete mappings for the operator's fixed output fields.
-
-
After the configuration is complete, click Save in the top menu bar of the canvas.
After configuring the operator, connect it to upstream or downstream operators to build the workflow.