Skip to content

Commit

Permalink
📈 Make worker thread count configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
phlmn committed Dec 4, 2023
1 parent 25a8fb2 commit 5e56465
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions worker/transcribee_worker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Settings(BaseSettings):

KEEPALIVE_INTERVAL: float = 0.5

CPU_THREADS: int = 4

class Config:
env_file = ".env"

Expand Down
1 change: 1 addition & 0 deletions worker/transcribee_worker/whisper_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def transcribe_clean(
strict_sentence_paragraphs,
)
model = WhisperModel(
cpu_threads=settings.CPU_THREADS,
model_size_or_path=model_name,
download_root=str((settings.MODELS_DIR / "faster_whisper").absolute()),
)
Expand Down

0 comments on commit 5e56465

Please sign in to comment.