Fedir Zadniprovskyi commited on
Commit
ff17e75
·
1 Parent(s): d075459

chore: expose additional config options (#51)

Browse files
Files changed (1) hide show
  1. faster_whisper_server/config.py +5 -0
faster_whisper_server/config.py CHANGED
@@ -147,6 +147,8 @@ class Task(enum.StrEnum):
147
 
148
 
149
  class WhisperConfig(BaseModel):
 
 
150
  model: str = Field(default="Systran/faster-whisper-medium.en")
151
  """
152
  Huggingface model to use for transcription. Note, the model must support being ran using CTranslate2.
@@ -155,6 +157,9 @@ class WhisperConfig(BaseModel):
155
  """
156
  inference_device: Device = Field(default=Device.AUTO)
157
  compute_type: Quantization = Field(default=Quantization.DEFAULT)
 
 
 
158
 
159
 
160
  class Config(BaseSettings):
 
147
 
148
 
149
  class WhisperConfig(BaseModel):
150
+ """See https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcribe.py#L599."""
151
+
152
  model: str = Field(default="Systran/faster-whisper-medium.en")
153
  """
154
  Huggingface model to use for transcription. Note, the model must support being ran using CTranslate2.
 
157
  """
158
  inference_device: Device = Field(default=Device.AUTO)
159
  compute_type: Quantization = Field(default=Quantization.DEFAULT)
160
+ device_index: int | list[int] = 0
161
+ cpu_threads: int = 16
162
+ num_workers: int = 1
163
 
164
 
165
  class Config(BaseSettings):