Add API_STT_THREADS env var to configure the number of STT threads per worker

This commit is contained in:
ChaoticByte 2025-06-08 18:40:28 +02:00
parent 6f4f287601
commit 38d91cad0c
No known key found for this signature in database
3 changed files with 7 additions and 1 deletions

View file

@ -31,7 +31,7 @@ def get_app() -> _Sanic:
@app.before_server_start
async def setup_stt(app):
app.ctx.stt = _STT(_env.API_STT_MODEL, logger=_ComponentLogger(f"{_getpid()}/STT"))
app.ctx.stt = _STT(_env.API_STT_MODEL, n_threads=_env.API_STT_THREADS, logger=_ComponentLogger(f"{_getpid()}/STT"))
@app.after_server_start
async def init_stt(app):