Audio Transcoding
The audio transcoding operator converts raw audio into WAV files with a 16 kHz sample rate, 16-bit depth, PCM encoding, and a single (mono) channel. It processes only audio objects from the input dataset and automatically ignores non-audio objects. This topic describes how to configure the audio transcoding operator.
Prerequisites
You must purchase the unstructured data feature for the current instance to use the workflow feature.
You have an existing workflow. For more information, see Create and manage workflows.
Permissions
In a Basic project, project administrators, developers, analysts, and custom project roles with the Dataset-Use permission can use any dataset in the project as the operator's input and output.
Supported file formats
The audio transcoding operator supports the following file formats: aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, and wmv.
Procedure
In the top navigation bar of the Dataphin homepage, choose R&D > 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 a workflow to open its canvas. Drag the Audio Transcoding operator from the operator library on the left onto the canvas. Then, configure the parameters in the Audio Transcoding panel that opens on the right.
Parameter
Description
Step name
The name of the operator. It can be up to 256 characters long and can contain any characters.
Input configuration
Dataset
Select the dataset to process. You can select only a mixed dataset. After you select a dataset, you must also select its version. By default, the earliest version is selected.
If this operator is downstream from another, this dataset is typically the output of the upstream operator.
Input field
The URL of the source audio file. You must select a source field from the input dataset. You can select only fields with the Is URL parameter set to Yes.
Filter condition (Optional)
Enter a filter condition using the syntax of an SQL
WHEREclause. System global variables, such as the business date ${bizdate}, are supported.Output configuration
Dataset
You can select a source dataset or an other dataset. If the source dataset's metadata table lacks a primary key, other dataset is selected by default.
If you select other dataset, you must also specify a mixed dataset and its version as the output dataset. By default, the earliest version is selected. You can also select other versions of the source dataset.
When you select a source dataset, the metadata generated by the operator is written to the metadata table corresponding to the source dataset's version.
File output path (Optional)
Enter the subdirectory where the transcoded files will be stored.
Load policy
If the metadata table of the selected output dataset has a primary key, the default option is update on primary key conflict. If no primary key exists, the default option is append data.
append data: Appends new data directly to the target table. An error occurs if a primary key or constraint conflict is found.
update on primary key conflict: If a primary key or constraint conflict occurs, the new data replaces the existing row that has the same primary key.
overwrite: Deletes all existing data from the target table before writing the new data.
NoteWhen the output dataset is set to source dataset, the only supported load policy is update on primary key conflict.
Field mapping
The audio transcoding operator always outputs the following field:
trans_audio_url: The storage URL of the transcoded audio file.By default, the operator's output fields are mapped to fields with the same names in the output dataset. You can also manually select target fields for custom mapping. Additionally, you can map passthrough fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
Add Output Field: Click to add a new, empty row for field mapping. This feature is available only when the output dataset is set to other dataset.
Batch Mapping: Click to perform batch manual mapping, map by name, or map by row. This feature is available only when the output dataset is set to other dataset.
Delete Mapping: Click the Delete icon to remove a field mapping row. You cannot delete the mapping for the operator's fixed output field.
After you configure the operator, click Save on the top menu bar of the canvas.
After configuring an individual operator, you can continue to build the complete workflow by adding upstream or downstream operators.