From 3567830096209285eed517e7e0e4f237230a4dad Mon Sep 17 00:00:00 2001 From: Fedir Zadniprovskyi Date: Thu, 13 Jun 2024 08:07:15 -0700 Subject: [PATCH] fix: timestamp_granularities remove plural form Fixes #19 --- faster_whisper_server/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/faster_whisper_server/main.py b/faster_whisper_server/main.py index 58b61cd..13bae10 100644 --- a/faster_whisper_server/main.py +++ b/faster_whisper_server/main.py @@ -210,9 +210,9 @@ def transcribe_file( response_format: Annotated[ResponseFormat, Form()] = config.default_response_format, temperature: Annotated[float, Form()] = 0.0, timestamp_granularities: Annotated[ - list[Literal["segments"] | Literal["words"]], + list[Literal["segment"] | Literal["word"]], Form(alias="timestamp_granularities[]"), - ] = ["segments"], + ] = ["segment"], stream: Annotated[bool, Form()] = False, ): start = time.perf_counter() @@ -222,7 +222,7 @@ def transcribe_file( task="transcribe", language=language, initial_prompt=prompt, - word_timestamps="words" in timestamp_granularities, + word_timestamps="word" in timestamp_granularities, temperature=temperature, vad_filter=True, )