Open topic with navigation

# LangId

The `LangId` task receives audio data from a file or binary stream and converts it into language identification features to identify the languages.

You can run this task in three modes:

- Segmented. Process the data in fixed-size chunks, and return the language identification results for each chunk.
- Cumulative. Return the running language identification score at periodic intervals, which is the score for all the data from the start to the current point.
- Boundary. Determine boundaries where the language changes, and return the language identification results between boundaries.

## Parameters

Parameter | Description | Required
--- | --- | ---
Type | The task name. Set to `LangId`. | Yes
AppFrameDupl | The balance between performance and speed for audio preprocessing DNN classification. |
AudioUpsampling | Whether to allow audio upsampling if the input audio has a sample rate too low for the task. |
Beam | The beam width of the search process. |
ClassList | A list of language classifiers to use. |
ClassPath | The path to the directory containing the language classifiers. |
ClosedSet | Whether to use closed set or open set language identification. |
DiagFile | The file to write the diagnostic information to. |
DiagLevel | The level of detail to include in the diagnostic information. |
DiscardShort | The minimum segment length to allow (when LidMode is `Boundary`). |
EndTime | The end of an audio section to process. |
File | The audio file to process. | Yes, if InputType is `File`.
FrameDupl | An integer value which allows for greater time efficiency with only a minimal loss of recognition accuracy. |
InputType | The type of audio to process (file, binary data, or stream). |
Lang | The name of the language pack to use. |
LangList | A subset of languages to use from the classifier list file. |
LidMode | The mode to use for language identification. |
MaxPhoneLen | The maximum phoneme length to allow (in seconds). |
MinPhoneRate | The minimum phoneme rate (phonemes per second). |
MinPhones | The minimum number of phonemes per segment. |
NBest | The maximum number of language candidates to include in the output file. |
Out | The file to write language identification results to. |
ScoreMode | The scoring method to use for speaker identification. |
SegSize | The maximum results segment size. |
StartTime | The beginning of an audio section to process. |
SugdInputChannels | The channel layout of the input media file. This parameter does not apply when InputType is `Stream`. |
SugdInputFrequency | The sampling rate of the input media file. This parameter does not apply when InputType is `Stream`. |

NOTE:

The `ClassList` parameter is required only if you want to change the audio sample rate, or if you want to use your own custom classifiers. You might also need to specify the `ClassPath` parameter, depending on the location of the classifier files.

## Examples

Segmented Mode

    http://localhost:15000/action=AddTask&Type=LangId&LidMode=segmented&InputType=Stream&Out=SpeechLang6.ctm

This action identifies languages in the audio stream using the default language classifiers, and writes the identification results to the `SpeechLang6.ctm` file.

    http://localhost:15000/action=AddTask&Type=LangId&LidMode=segmented&File=C:\Data\Speech.wav

This action identifies the language in the `Speech.wav` file using the default language classifiers.

Cumulative Mode

    http://localhost:15000/action=AddTask&Type=LangId&LidMode=cumulative&InputType=Stream&Out=SpeechLang3.ctm

This action identifies the language in the audio stream using the default language classifiers and writes the identification results to the `SpeechLang3.ctm` file.

    http://localhost:15000/action=AddTask&Type=LangId&LidMode=cumulative&File=C:\Data\Speech.wav&Out=SpeechLang4.ctm

This action identifies the language in the `Speech.wav` file using the default language classifiers and writes the identification results to the `SpeechLang4.ctm` file.

Boundary Mode

    http://localhost:15000/action=AddTask&Type=LangId&LidMode=boundary&InputType=Stream&ClassList=ListManager/OptClassSet&ClassPath=C:\LangID\&Out=SpeechLang1.ctm

This action identifies languages and language boundaries in the audio stream using the language classifiers specified in the `OptClassSet` list and writes the identification results to the `SpeechLang1.ctm` file.

    http://localhost:15000/action=AddTask&Type=LangId&Lidmode=boundary&File=C:\Data\Speech.wav

This action identifies languages and language boundaries in the `Speech.wav` file using the default language classifiers.

© 2015-2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm