Add API_STT_THREADS env var to configure the number of STT threads per worker
This commit is contained in:
parent
6f4f287601
commit
38d91cad0c
3 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,11 @@ _logger = _ComponentLogger("Environment", print_timestamp=False)
|
|||
try:
|
||||
ACCESS_CONTROL_ALLOW_ORIGIN = str(_environ["ACCESS_CONTROL_ALLOW_ORIGIN"])
|
||||
API_STT_MODEL = _Path(_environ["API_STT_MODEL"])
|
||||
API_STT_THREADS = int(_environ.get("API_STT_THREADS", 4)) # per worker
|
||||
# log stt config
|
||||
_logger.info("STT Configuration:")
|
||||
_logger.info(f" Model: {API_STT_MODEL}")
|
||||
_logger.info(f" Threads: {API_STT_THREADS} per worker")
|
||||
except KeyError as e:
|
||||
_logger.critical(f"Missing {e}")
|
||||
exit(1)
|
||||
|
|
Reference in a new issue