Skip to content

Commit

Permalink
fix: timestamp_granularities remove plural form
Browse files Browse the repository at this point in the history
Fixes #19
  • Loading branch information
Fedir Zadniprovskyi committed Jun 13, 2024
1 parent a83bc4f commit 3567830
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faster_whisper_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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,
)
Expand Down

0 comments on commit 3567830

Please sign in to comment.