Audio language detection

Updated at:

The Audio Language Detection operator detects the language spoken in an audio file. It processes only audio objects from the input dataset and ignores all other object types. This topic describes how to configure this operator.

Prerequisites

  • The workflow feature is available only after you purchase the unstructured data feature for the current instance.

  • A workflow has been created. For more information, see Create a workflow.

Background information

  • The Audio Language Detection operator supports the following file formats: aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, and wmv.

  • By default, the Audio Language Detection operator is allocated 0.5 cores and 1 GB of resources.

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 an input or output dataset for the operator.

Procedure

  1. On the Dataphin home page, in the top menu bar, select Development > Data Development.

  2. On the Developer page, in the top menu bar, select Project.

  3. In the navigation pane on the left, select Data Processing > Workflow. In the Workflow list on the left, click the target workflow to open its canvas. From the Operator Library on the left, drag the Audio Language Detection operator to the canvas. In the Audio Language Detection pane on the right, configure the following parameters.

    Parameter

    Description

    Step Name

    Enter a name for the operator. The name can contain any characters and be up to 256 characters in length.

    Input Configuration

    Dataset

    Select the dataset to process. Only a Mixed Dataset can be selected. After you select a dataset, select its Version. The first version of the dataset is selected by default.

    When this operator is downstream from another operator, the selected dataset is usually the same as the output dataset of the upstream operator.

    Input Field

    Select the source field from the input dataset that contains the storage URL of the audio file to process. You can select only fields for which the Is URL parameter is set to Yes.

    Filter Condition (Optional)

    Use SQL syntax. Enter only the filter condition that follows the WHERE clause. System global variables, such as the data timestamp ${bizdate}, are supported.

    Model Configuration

    Model

    Specify the Model for the current operator. You can only select an enabled model from Application Management > Model Configuration where the model type includes Audio and the audio capability includes Language Detection.

    Output Configuration

    Dataset

    You can select Source Dataset or Other Dataset. If the metadata table of the source dataset does not have a primary key, the output dataset defaults to Other Dataset.

    When you select Other Dataset, specify a Mixed Dataset and its Version as the output dataset. The first version of the dataset is selected by default. You can also select other versions of the source dataset.

    When you select Source Dataset, the metadata generated by the operator is written to the metadata table of the corresponding version of the source dataset.

    Loading Policy

    If the metadata table of the selected output dataset has a primary key, Update on Primary Key Conflict is selected by default. If no primary key exists, Append Data is selected by default.

    • Append Data: Appends new data directly to the destination table. A constraint violation error is reported if a primary key conflict occurs.

    • Update on Primary Key Conflict: If a primary key conflict occurs, the old data in the row with the duplicate primary key is deleted before the new data is inserted.

    • Overwrite: Deletes the existing data in the destination table and then writes the new data.

    Note

    If you select Source Dataset as the output dataset, only Update on Primary Key Conflict is supported as the loading policy.

    Field Mapping

    The Audio Language Detection operator has the following fixed output fields:

    • language: The language in the audio.

    • {file_url}: The URL of the audio file. The field name is the same as the source field and is not fixed. This field is output only when Other Dataset is selected as the output dataset. You can delete this field mapping.

    By default, the operator's output fields are mapped to fields with the same names in the output dataset. You can also manually select destination fields for custom mapping. You can also map pass-through fields from the source dataset to the destination dataset. You can manage field mappings in the following ways:

    • Add Output Field: Click to add a new, empty field mapping row. This feature is available only when Other Dataset is selected as the output dataset.

    • Batch Mapping: Click to choose between batch manual mapping, same-name mapping, or same-row mapping. This feature is available only when Other Dataset is selected as the output dataset.

    • Delete Mapping: Click the Delete icon to delete a field mapping row. You cannot delete mappings for the operator's fixed output fields.

  4. After you complete the configuration, click Save in the top menu bar of the canvas.

    You can then add upstream or downstream operators to complete the workflow.