Correcting the speech-to-text output
This commit is contained in:
+7
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user