LoadSpeechLanguageResource

Loads a language resource so that it is ready when you want to start processing.

Ensure that the model version, language pack, custom language models and interpolation weights, and custom word database that you specify in this action match the configuration of your speech-to-text task exactly.

TIP: Media Server automatically loads any resources that are needed to run speech-to-text, but you can load resources before sending a process action, so that processing can begin without delay.

Language resources that you load remain in memory until you unload them with the action UnloadSpeechLanguageResource, or until Media Server is stopped. To automatically load language resources when Media Server starts, use the configuration parameter SpeechLanguageResources in the [PersistentData] section of the configuration file.

Type: asynchronous

Parameter Description Required
LanguagePack The language pack to load. Yes
CustomLanguageModel

A comma-separated list of language models, with interpolation weights, to supplement the language pack. Separate keys from values with a colon (:). Any language models you specify must have been trained with the same language pack specified by the LanguagePack parameter.

Custom language models are supported only for legacy speech-to-text models (ModelVersion=legacy).

No
CustomWordDatabase

The name of a custom word database to use to supplement the language pack.

Custom word databases are supported only for legacy speech-to-text models (ModelVersion=legacy).

No
ModelVersion The model to use to convert speech into text (default legacy). This corresponds to the value of the ModelVersion parameter in your speech-to-text task. No

Example

The following action loads a language resource for speech-to-text with the out-of-the-box ENUK language pack and the small speech-to-text model:

/action=LoadSpeechLanguageResource&LanguagePack=ENUK&ModelVersion=small

The following action loads a language resource that combines a custom language model with the standard ENUK language pack and the legacy speech to text model. The custom language model is loaded with an interpolation weight of 0.1:

/action=LoadSpeechLanguageResource&LanguagePack=ENUK
                                  &CustomLanguageModel=MedicalTerms:0.1

Response

This action is asynchronous, so Media Server always returns success accompanied by a token. You can use the token with the QueueInfo action to retrieve the status of the action:

<autnresponse>
  <action>QUEUEINFO</action>
  <response>SUCCESS</response>
  <responsedata>
    <actions>
      <action>
        <status>Finished</status>
        <queued_time>2018-May-17 08:07:11</queued_time>
        <time_in_queue>0</time_in_queue>
        <process_start_time>2018-May-17 08:07:11</process_start_time>
        <time_processing>15</time_processing>
        <process_end_time>2018-May-17 08:07:26</process_end_time>
        <identifier>66e2899a64a21cef</identifier>
        <token>...</token>
      </action>
    </actions>
  </responsedata>
</autnresponse>

The response includes an identifier which you can use with the action UnloadSpeechLanguageResource, should you want to unload the resource.

See Also

To list the language resources that you have loaded, use the action ListSpeechLanguageResources.