From e08453d17acf7a4cb65b461046f3e0ec8bbc581f Mon Sep 17 00:00:00 2001 From: Fedir Zadniprovskyi Date: Mon, 16 Dec 2024 18:23:03 -0800 Subject: [PATCH] chore: document `sample_rate` param --- src/faster_whisper_server/routers/speech.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/faster_whisper_server/routers/speech.py b/src/faster_whisper_server/routers/speech.py index 95b20608..c98d342f 100644 --- a/src/faster_whisper_server/routers/speech.py +++ b/src/faster_whisper_server/routers/speech.py @@ -134,7 +134,8 @@ class CreateSpeechRequestBody(BaseModel): # https://platform.openai.com/docs/api-reference/audio/createSpeech#audio-createspeech-voice speed: float = Field(1.0, ge=0.25, le=4.0) """The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.""" - sample_rate: int | None = Field(None, ge=MIN_SAMPLE_RATE, le=MAX_SAMPLE_RATE) # TODO: document + sample_rate: int | None = Field(None, ge=MIN_SAMPLE_RATE, le=MAX_SAMPLE_RATE) + """Desired sample rate to convert the generated audio to. If not provided, the model's default sample rate will be used.""" # noqa: E501 # TODO: move into `Voice` @model_validator(mode="after")