Open topic with navigation

# Find Recommended Language Resources to Use in a Task

HPE IDOL Speech Server can recommend language packs to use with a particular audio file, if provided with the file and a language code. This is helpful if multiple languages are defined for a single language code, or if you are not sure whether to use a broadband or telephony pack.

For HPE IDOL Speech Server to recommend a language pack:

- You must configure the language pack in the tasks configuration file (see Configure Language Packs).
- All required language pack files must be available on disk.
- The language must be licensed.
- The language pack must have a sample frequency equal to, or lower than, the sample frequency of the audio file (HPE IDOL Speech Server does not permit upsampling).

To find language packs to use with a file

- Send the `ResourceSelection` action to HPE IDOL Speech Server, and set the following action parameters:

  `File` | The audio file to find a language pack for.
  `Lang` | The language code. You can search using the base language code (for example, `EN`) or the full code (for example, `ENUS`).

For example:

    http://localhost:13000/action=ResourceSelection&Lang=ENUK&File=C:\data\sample.wav

This action uses port `13000` to instruct HPE IDOL Speech Server, which is located on the local machine, to recommend British English language packs that you can use with the `sample.wav` file.

The action returns a list of language packs that you can use in tasks that process the specified file. For example:

    <autnresponse>
    	<action>RESOURCESELECTION</action>
    	<response>SUCCESS</response>
    	<responsedata>
    		<audioRate>16000</audioRate>
    		<resourceRate>16000</resourceRate>
    		<resources>
    			<resource>enuk</resource>
    			<resource>enuk-news</resource>
    		</resources>
    	</responsedata>
    </autnresponse>

In this example, HPE IDOL Speech Server suggests the standard `ENUK` language pack and a pack that contains the custom `news` language model.

If you use the base code, HPE IDOL Speech Server returns all language packs that cover the base language that you specified.

For example:

    http://localhost:13000/action=ResourceSelection&Lang=EN&File=C:\data\sample.wav

This action uses port `13000` to instruct HPE IDOL Speech Server, which is located on the local machine, to recommend language packs that cover the base language `EN` that you can use with the `sample.wav` file. For example:

    <resources>
        <resource>enau</resource>
        <resource>enca</resource>
        <resource>enuk</resource>
        <resource>enus</resource>
    </resources>

The tasks configuration file contains language sections for each of the suggested resources.

Note: The names of the resource configuration sections might be in a different case to the names returned by the `ResourceSelection` action.

If HPE IDOL Speech Server cannot find any suitable language packs, it still returns a `SUCCESS` response (the action itself did not fail) but includes an explanatory message. For example:

    <autnresponse>
    	<action>RESOURCESELECTION</action>
    	<response>SUCCESS</response>
    	<responsedata>
    		<audioRate>16000</audioRate>
    		<details>
    		No suitable language packs found (lang code zhtw, with sample rate 16000)
    		</details>
    	</responsedata>
    </autnresponse>

Similarly, HPE IDOL Speech Server provides details if it finds appropriate language packs, but they are unavailable for use (for example, unlicensed packs). If HPE IDOL Speech Server finds appropriate language packs, but they are for the wrong sample frequency (for example, 8 kHz telephony packs for a 16 kHz audio file), HPE IDOL Speech Server lists the packs but includes a warning in the `details` section.

If the action fails (for example, because the audio is missing or in the wrong format), HPE IDOL Speech Server returns an error message.

© 2013-2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE 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 AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm