Skip to content

Commit

Permalink
Merge pull request #200 from mobiusml/batched_whisper_param
Browse files Browse the repository at this point in the history
Adding timestamp related params to batched version
  • Loading branch information
Jiltseb authored Nov 11, 2024
2 parents 72b30e3 + 8781b72 commit d5e8f39
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 d5e8f39

Please sign in to comment.