Skip to main content

Language Identification: start task

POST 

/api/technology/language-identification

Start a Language Identification task for a media file.

Language Identification features

  • Multi-channel audio files are supported.
  • For each channel an independent Language Identification result is produced.
  • Languages for identification can be specified in the request body.
  • Language groups for identification can be specified in the request body.
  • Processing can be limited to a specific time segment in the media file with query parameters.
  • Processing can be limited to a maximum amount of speech with a query parameter.

Request

Query Parameters

    channel_mode Channel Mode

    Possible values: [split, mix]

    Default value: split

    A string enumeration value representing the channel mode for conversion. This value indicates how the audio channels should be processed during conversion. Only the channels with the specified indices (channels parameter) will be processed, and others will be ignored.

    channels Channels

    A string of integers separated by comma (without spaces), representing the channels that should be kept during conversion. If specified, only the channels with the specified indices will be processed, and others will be ignored. If empty, all channels in the audio data will be processed. Note that channels is 0-based.

    range_from Range From

    Default value: 0

    Specifies the time in the input file where processing starts. If the parameter equals 0 (the default value), the recording is processed from the beginning. Time is given in seconds.

    range_to Range To

    Specifies the time in the file where processing ends. If the parameter is not specified, the input file is processed to the end. Time is given in seconds.

    max_speech_length any

Header Parameters

    x-correlation-id X-Correlation-Id

    Correlation ID is a special type of request ID which is unique over a series of requests and responses, identifying a transaction in a distributed system. Correlation ID will be generated if not provided.

    x-request-id X-Request-Id

    In distributed system architecture (microservices architecture) it is a unique ID of request and response combination throughout all components of a distributed system. Request ID will be generated if not provided.

Body

required

    file binaryrequired

    Input media file.

    config

    object

    Optional configuration for Language Identification.

    languages string[]

    List of languages that can be used for identification. This parameter will remove all other languages from the results.

    language_groups

    object[]

    List of groups of languages that will be treated as a single result item.

  • Array [

  • identifier Identifier (string)required

    The group identifier must be unique and must not be the same as the code of any existing language. NOTE: The identifiers and language codes are case insensitive, so 'fr' is treated the same as 'FR'.

    languages string[]required

    All language codes in the list must be contained in the supported languages list. If config.languages is specified, all group languages must be contained in the specified language list.

  • ]

Responses

Language Identification task was accepted. Follow the X-Location header to poll for the task state.

Response Headers

  • X-Location

    string

    Example: /api/technology/language-identification/123e4567-e89b-12d3-a456-426614174000

    A URL the client should poll for task state and result.

Schema

    task

    object

    required

    task_id uuidrequired
    state TaskInfoState (string)required

    Possible values: [pending, running, rejected, failed, done]

Loading...