Skip to content

Commit 1310f8a

Browse files
Fedir Zadniprovskyifedirz
authored andcommitted
chore: document sample_rate param
1 parent 0ff515c commit 1310f8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/faster_whisper_server/routers/speech.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class CreateSpeechRequestBody(BaseModel):
134134
# https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-voice
135135
speed: float = Field(1.0, ge=0.25, le=4.0)
136136
"""The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default."""
137-
sample_rate: int | None = Field(None, ge=MIN_SAMPLE_RATE, le=MAX_SAMPLE_RATE) # TODO: document
137+
sample_rate: int | None = Field(None, ge=MIN_SAMPLE_RATE, le=MAX_SAMPLE_RATE)
138+
"""Desired sample rate to convert the generated audio to. If not provided, the model's default sample rate will be used.""" # noqa: E501
138139

139140
# TODO: move into `Voice`
140141
@model_validator(mode="after")

0 commit comments

Comments
 (0)