Skip to content

Commit bd90799

Browse files
author
Fedir Zadniprovskyi
committed
chore: expose additional config options (#51)
1 parent ad4e94d commit bd90799

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

faster_whisper_server/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ class Task(enum.StrEnum):
147147

148148

149149
class WhisperConfig(BaseModel):
150+
"""See https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/transcribe.py#L599."""
151+
150152
model: str = Field(default="Systran/faster-whisper-medium.en")
151153
"""
152154
Huggingface model to use for transcription. Note, the model must support being ran using CTranslate2.
@@ -155,6 +157,9 @@ class WhisperConfig(BaseModel):
155157
"""
156158
inference_device: Device = Field(default=Device.AUTO)
157159
compute_type: Quantization = Field(default=Quantization.DEFAULT)
160+
device_index: int | list[int] = 0
161+
cpu_threads: int = 16
162+
num_workers: int = 1
158163

159164

160165
class Config(BaseSettings):

0 commit comments

Comments
 (0)