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
|
@ -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):
|
||||
|
|
Reference in a new issue