Skip to content

Commit

Permalink
chore: expose additional config options (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi committed Aug 27, 2024
1 parent ad4e94d commit bd90799
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions faster_whisper_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ class Task(enum.StrEnum):


class WhisperConfig(BaseModel):
"""See https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcribe.py#L599."""

model: str = Field(default="Systran/faster-whisper-medium.en")
"""
Huggingface model to use for transcription. Note, the model must support being ran using CTranslate2.
Expand All @@ -155,6 +157,9 @@ class WhisperConfig(BaseModel):
"""
inference_device: Device = Field(default=Device.AUTO)
compute_type: Quantization = Field(default=Quantization.DEFAULT)
device_index: int | list[int] = 0
cpu_threads: int = 16
num_workers: int = 1


class Config(BaseSettings):
Expand Down

0 comments on commit bd90799

Please sign in to comment.