Skip to content

Commit

Permalink
adding without_timestamps and word_timestamps params to batched version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiltseb committed Nov 6, 2024
1 parent a04c5be commit 8781b72
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aana/core/models/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class WhisperParams(BaseModel):
"Temperature for sampling. A single value or a sequence indicating fallback temperatures."
),
)
without_timestamps: bool = Field(
default=False,
description="Whether to sample only text tokens in decoding.",
)
word_timestamps: bool = Field(
default=False, description="Whether to extract word-level timestamps."
)
Expand Down Expand Up @@ -114,6 +118,13 @@ class BatchedWhisperParams(BaseModel):
"Temperature for sampling. A single value or a sequence indicating fallback temperatures."
),
)
without_timestamps: bool = Field(
default=True,
description="Whether to sample only text tokens in decoding. Set to 'False' to get phrase-level time stamps (eg. for subtitles)",
)
word_timestamps: bool = Field(
default=False, description="Whether to extract word-level timestamps."
)

@field_validator("temperature")
@classmethod
Expand Down

0 comments on commit 8781b72

Please sign in to comment.