diff --git a/worker/transcribee_worker/config.py b/worker/transcribee_worker/config.py index 9dbaec9a..a14b4859 100644 --- a/worker/transcribee_worker/config.py +++ b/worker/transcribee_worker/config.py @@ -40,6 +40,8 @@ class Settings(BaseSettings): CPU_THREADS: int = 4 + COMPUTE_TYPE: str = "int8" + class Config: env_file = ".env" diff --git a/worker/transcribee_worker/whisper_transcribe.py b/worker/transcribee_worker/whisper_transcribe.py index 6e27833c..c901281d 100644 --- a/worker/transcribee_worker/whisper_transcribe.py +++ b/worker/transcribee_worker/whisper_transcribe.py @@ -175,6 +175,7 @@ def transcribe_clean( strict_sentence_paragraphs, ) model = WhisperModel( + compute_type=settings.COMPUTE_TYPE, cpu_threads=settings.CPU_THREADS, model_size_or_path=model_name, download_root=str((settings.MODELS_DIR / "faster_whisper").absolute()),