Skip to main content

Speech Engine Technologies, Instances and Workers

Configuring Speech Engine to utilize effectively the full power of underlying hardware can get challenging – one can easily get lost in all the strange terms like technologies, instances, slots, or workers. This article should shed some light on it.

Speech Engine is like a post office

There is a very nice analogy with post office (or bank branch):

Post Office AnalogySpeech Engine Analogy
A post office is a place that provides various services, such as sending letters, sending or picking up packages, getting a P.O. Box, obtaining financial services, insurance, etc.Speech Engine has various speech technologies configured, such as analyzing audio quality, extracting voiceprints from recordings, comparing voiceprints, transcribing audio to text, etc.
Different post offices may provide different sets of services. Smaller offices may offer only a limited set of services, while larger ones can provide a wide range of services.Different Speech Engine installations may offer different sets of technologies. Smaller installations might have only a single technology configured, while larger ones can have a wide range of technologies configured.
There are one or more counter desks reserved for particular services in the post office. These desks are always present, occupying space, whether they are open (staffed by a worker) or not.There are one or more instances configured for each technology in the Speech Engine installation. These instances are initialized at startup, consuming memory, regardless of being actively used for processing or not.
Customers are served by post office workers at the counter desks that provide a particular service.Requests are served by processing workers assigned to an instance of a particular technology.

Speech Engine workers are like post office workers

A similar analogy exists between the post office staffing and the Speech Engine workers configuration:

Post Office Staffing AnalogySpeech Engine Workers Configuration Analogy
Some post office workers are trained only for certain types of services (e.g., postal services), while others are trained for different services (e.g., financial services).Speech Engine has separate workers for file processing and real-time stream processing.
They cannot provide services other than those they were trained for. Staffing the post office should be managed accordingly. Ideally, there should be enough workers to keep all counter desks open at all times.File processing workers cannot process real-time streams, and vice versa. Configuration of Speech Engine workers should be managed accordingly. Ideally, there should be enough workers of each type to allow all technologies to process at all times.
If there are fewer office workers than counter desks for each service type, some counter desks must be temporarily closed, and some clients have to wait until an office worker is free to serve at the closed counters.If there are fewer workers of a certain type than initialized instances of technologies, some processing requests have to wait until a worker is free to handle the waiting requests.
If there are more office workers than counter desks for each service type, the extra workers may “compete” for necessary working tools with other workers, which slows down the service to clients.If there are more workers of a certain type than initialized instances of technologies, the workers start “competing” with each other for processing power, which slows down overall processing.

If the above clarifies the relationship between Speech Engine installations, technologies, instances, and workers, you can continue reading in the SPE workers configuration article.