simulstream.server.websocket_server.SpeechProcessorPool
- class simulstream.server.websocket_server.SpeechProcessorPool(speech_processor_config: SimpleNamespace, size: int, acquire_timeout: int)
Bases:
objectA pool of speech processors initialized at startup and made available to clients.
- Parameters:
- __init__(speech_processor_config: SimpleNamespace, size: int, acquire_timeout: int)
Methods
__init__(speech_processor_config, size, ...)acquire()Acquire one process from the pool and release it automatically.
- acquire()
Acquire one process from the pool and release it automatically.
- Returns:
a speech processor available for usage.
- Return type:
- Raises:
TimeoutError – if no speech processor is available within the configured timeout.