Configure Task Queues

By default, IDOL Speech Server refuses tasks if the active task count or active language pack count are at their maximum configured values. This behavior can be desirable if a task requires immediate processing, such as live audio streaming. It is also useful if several IDOL Speech Server instances are running, so that tasks can be resubmitted to an available server. However, if you process many audio files on a single server, you can queue the tasks until resources become available.

Enable Queues

To enable queuing, set the EnableQueue parameter to True in the [Server] section of the IDOL Speech Server configuration file. For example:

[Server]
EnableQueue=True

When queuing is enabled, the server maintains a queue of tasks awaiting processing. Initially the queue is empty.

When an AddTask action is sent to IDOL Speech Server, the task is assigned to a task manager and runs if sufficient resources are available and if no other tasks are queued. If insufficient resources exist or if other tasks are in the queue, the new task is added to the end of the queue.

When a task completes and the resources become available, IDOL Speech Server assigns the next task in the queue to a task manager and removes it from the queue.

NOTE:

If you enable queuing, the CheckResources, LoadLanguage, and UnloadLanguage actions are disabled.

If you use the AbortTask action to end a queued task, IDOL Speech Server removes the task from the queue and does not process it.

View Queue Status

To view the status of the task queue, send a GetStatus action.

For example:

http://localhost:13000/action=GetStatus

This action returns the status information for the server, including queue information from the IDOL Speech Server located on the local machine using ACI port 13000.

If you want to omit queue information from GetStatus, add the ShowQueue parameter to the GetStatus action. For example:

http://localhost:13000/action=GetStatus&ShowQueue=False

This action returns the status information for the server, excluding queue information from the IDOL Speech Server located on the local machine using ACI port 13000.

When a task is sent to IDOL Speech Server, it is given a unique task token. If you add a task token to the GetStatus action to view the status of a specific task, you can view the position of that task in the queue. It does not show information on the rest of the queue.

NOTE:

By default, IDOL Speech Server supports a maximum of 5,000 tokens for completed tasks at any one time. If there are more than 5,000 completed tasks, IDOL Speech Server deletes the task in the list that has the earliest completion time. The GetStatus action does not recognize the tokens of tasks that have been removed from the history list.

To increase the number of completed tasks for which the server retains information, edit the value of the TaskHistorySize parameter in the [Server] section of the configuration file. For more information, see the IDOL Speech Server Reference.


_HP_HTML5_bannerTitle.htm