Correcting the speech-to-text output

This commit is contained in:
2026-09-22 12:24:53 +03:30
parent 75a73559b5
commit 58c3e25db6
3 changed files with 16 additions and 4 deletions
+7 -1
View File
@@ -97,7 +97,13 @@ def _get_model() -> WhisperModel:
compute = _env("STT_COMPUTE_TYPE", "int8") or "int8"
logger.info("Loading Faster-Whisper model=%s device=%s compute=%s", name, device, compute)
try:
loaded = WhisperModel(name, device=device, compute_type=compute)
loaded = WhisperModel(
name,
device=device,
compute_type=compute,
cpu_threads=2,
num_workers=1,
)
except Exception as exc:
_model_error = str(exc)
logger.exception("Whisper model load failed")