mirror of
https://github.com/shirayu/whispering.git
synced 2024-05-09 11:52:59 +00:00
22 lines
604 B
Python
22 lines
604 B
Python
#!/usr/bin/env python3
|
|
|
|
from typing import Optional, Tuple
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class WhisperConfig(BaseModel):
|
|
model_name: str
|
|
device: str
|
|
language: str
|
|
|
|
temperatures: Tuple[float, ...] = (0.0, 0.2, 0.4, 0.6, 0.8, 1.0)
|
|
compression_ratio_threshold: Optional[float] = 2.4
|
|
logprob_threshold: Optional[float] = -1.0
|
|
no_captions_threshold: Optional[float] = 0.6
|
|
best_of: int = 5
|
|
beam_size: Optional[int] = None
|
|
no_speech_threshold: Optional[float] = 0.6
|
|
logprob_threshold: Optional[float] = -1.0
|
|
compression_ratio_threshold: Optional[float] = 2.4
|