SYMBOL INDEX (188 symbols across 17 files) FILE: tests/conftest.py function pytest_configure (line 7) | def pytest_configure(config): function random (line 12) | def random(): FILE: tests/test_audio.py function test_audio (line 8) | def test_audio(): FILE: tests/test_normalizer.py function test_number_normalizer (line 11) | def test_number_normalizer(std): function test_spelling_normalizer (line 77) | def test_spelling_normalizer(): function test_text_normalizer (line 84) | def test_text_normalizer(): FILE: tests/test_timing.py function test_dtw (line 23) | def test_dtw(N: int, M: int): function test_dtw_cuda_equivalence (line 57) | def test_dtw_cuda_equivalence(N: int, M: int): function test_median_filter (line 68) | def test_median_filter(shape): function test_median_filter_equivalence (line 89) | def test_median_filter_equivalence(shape): FILE: tests/test_tokenizer.py function test_tokenizer (line 7) | def test_tokenizer(multilingual): function test_multilingual_tokenizer (line 14) | def test_multilingual_tokenizer(): function test_split_on_unicode (line 27) | def test_split_on_unicode(): FILE: tests/test_transcribe.py function test_transcribe (line 11) | def test_transcribe(model_name: str): FILE: whisper/__init__.py function _download (line 54) | def _download(url: str, root: str, in_memory: bool) -> Union[bytes, str]: function available_models (line 98) | def available_models() -> List[str]: function load_model (line 103) | def load_model( FILE: whisper/audio.py function load_audio (line 25) | def load_audio(file: str, sr: int = SAMPLE_RATE): function pad_or_trim (line 65) | def pad_or_trim(array, length: int = N_SAMPLES, *, axis: int = -1): function mel_filters (line 92) | def mel_filters(device, n_mels: int) -> torch.Tensor: function log_mel_spectrogram (line 110) | def log_mel_spectrogram( FILE: whisper/decoding.py function detect_language (line 19) | def detect_language( class DecodingOptions (line 81) | class DecodingOptions: class DecodingResult (line 118) | class DecodingResult: class Inference (line 130) | class Inference: method logits (line 131) | def logits(self, tokens: Tensor, audio_features: Tensor) -> Tensor: method rearrange_kv_cache (line 135) | def rearrange_kv_cache(self, source_indices) -> None: method cleanup_caching (line 139) | def cleanup_caching(self) -> None: class PyTorchInference (line 144) | class PyTorchInference(Inference): method __init__ (line 145) | def __init__(self, model: "Whisper", initial_token_length: int): method logits (line 155) | def logits(self, tokens: Tensor, audio_features: Tensor) -> Tensor: method cleanup_caching (line 165) | def cleanup_caching(self): method rearrange_kv_cache (line 172) | def rearrange_kv_cache(self, source_indices): class SequenceRanker (line 179) | class SequenceRanker: method rank (line 180) | def rank( class MaximumLikelihoodRanker (line 190) | class MaximumLikelihoodRanker(SequenceRanker): method __init__ (line 196) | def __init__(self, length_penalty: Optional[float]): method rank (line 199) | def rank(self, tokens: List[List[Tensor]], sum_logprobs: List[List[flo... class TokenDecoder (line 216) | class TokenDecoder: method reset (line 217) | def reset(self): method update (line 220) | def update( method finalize (line 247) | def finalize( class GreedyDecoder (line 272) | class GreedyDecoder(TokenDecoder): method __init__ (line 273) | def __init__(self, temperature: float, eot: int): method update (line 277) | def update( method finalize (line 295) | def finalize(self, tokens: Tensor, sum_logprobs: Tensor): class BeamSearchDecoder (line 301) | class BeamSearchDecoder(TokenDecoder): method __init__ (line 302) | def __init__( method reset (line 320) | def reset(self): method update (line 323) | def update( method finalize (line 384) | def finalize(self, preceding_tokens: Tensor, sum_logprobs: Tensor): class LogitFilter (line 407) | class LogitFilter: method apply (line 408) | def apply(self, logits: Tensor, tokens: Tensor) -> None: class SuppressBlank (line 423) | class SuppressBlank(LogitFilter): method __init__ (line 424) | def __init__(self, tokenizer: Tokenizer, sample_begin: int): method apply (line 428) | def apply(self, logits: Tensor, tokens: Tensor): class SuppressTokens (line 433) | class SuppressTokens(LogitFilter): method __init__ (line 434) | def __init__(self, suppress_tokens: Sequence[int]): method apply (line 437) | def apply(self, logits: Tensor, tokens: Tensor): class ApplyTimestampRules (line 441) | class ApplyTimestampRules(LogitFilter): method __init__ (line 442) | def __init__( method apply (line 452) | def apply(self, logits: Tensor, tokens: Tensor): class DecodingTask (line 508) | class DecodingTask: method __init__ (line 514) | def __init__(self, model: "Whisper", options: DecodingOptions): method _verify_options (line 572) | def _verify_options(self, options: DecodingOptions) -> DecodingOptions: method _get_initial_tokens (line 587) | def _get_initial_tokens(self) -> Tuple[int]: method _get_suppress_tokens (line 615) | def _get_suppress_tokens(self) -> Tuple[int]: method _get_audio_features (line 644) | def _get_audio_features(self, mel: Tensor): method _detect_language (line 666) | def _detect_language(self, audio_features: Tensor, tokens: Tensor): method _main_loop (line 680) | def _main_loop(self, audio_features: Tensor, tokens: Tensor): method run (line 713) | def run(self, mel: Tensor) -> List[DecodingResult]: function decode (line 793) | def decode( FILE: whisper/model.py class ModelDimensions (line 26) | class ModelDimensions: class LayerNorm (line 39) | class LayerNorm(nn.LayerNorm): method forward (line 40) | def forward(self, x: Tensor) -> Tensor: class Linear (line 44) | class Linear(nn.Linear): method forward (line 45) | def forward(self, x: Tensor) -> Tensor: class Conv1d (line 53) | class Conv1d(nn.Conv1d): method _conv_forward (line 54) | def _conv_forward( function sinusoids (line 62) | def sinusoids(length, channels, max_timescale=10000): function disable_sdpa (line 72) | def disable_sdpa(): class MultiHeadAttention (line 81) | class MultiHeadAttention(nn.Module): method __init__ (line 84) | def __init__(self, n_state: int, n_head: int): method forward (line 92) | def forward( method qkv_attention (line 114) | def qkv_attention( class ResidualAttentionBlock (line 142) | class ResidualAttentionBlock(nn.Module): method __init__ (line 143) | def __init__(self, n_state: int, n_head: int, cross_attention: bool = ... method forward (line 160) | def forward( class AudioEncoder (line 174) | class AudioEncoder(nn.Module): method __init__ (line 175) | def __init__( method forward (line 188) | def forward(self, x: Tensor): class TextDecoder (line 207) | class TextDecoder(nn.Module): method __init__ (line 208) | def __init__( method forward (line 227) | def forward(self, x: Tensor, xa: Tensor, kv_cache: Optional[dict] = No... class Whisper (line 252) | class Whisper(nn.Module): method __init__ (line 253) | def __init__(self, dims: ModelDimensions): method set_alignment_heads (line 278) | def set_alignment_heads(self, dump: bytes): method embed_audio (line 287) | def embed_audio(self, mel: torch.Tensor): method logits (line 290) | def logits(self, tokens: torch.Tensor, audio_features: torch.Tensor): method forward (line 293) | def forward( method device (line 299) | def device(self): method is_multilingual (line 303) | def is_multilingual(self): method num_languages (line 307) | def num_languages(self): method install_kv_cache_hooks (line 310) | def install_kv_cache_hooks(self, cache: Optional[dict] = None): FILE: whisper/normalizers/basic.py function remove_symbols_and_diacritics (line 27) | def remove_symbols_and_diacritics(s: str, keep=""): function remove_symbols (line 50) | def remove_symbols(s: str): class BasicTextNormalizer (line 60) | class BasicTextNormalizer: method __init__ (line 61) | def __init__(self, remove_diacritics: bool = False, split_letters: boo... method __call__ (line 67) | def __call__(self, s: str): FILE: whisper/normalizers/english.py class EnglishNumberNormalizer (line 12) | class EnglishNumberNormalizer: method __init__ (line 23) | def __init__(self): method process_words (line 165) | def process_words(self, words: List[str]) -> Iterator[str]: method preprocess (line 388) | def preprocess(self, s: str): method postprocess (line 417) | def postprocess(self, s: str): method __call__ (line 442) | def __call__(self, s: str): class EnglishSpellingNormalizer (line 450) | class EnglishSpellingNormalizer: method __init__ (line 457) | def __init__(self): method __call__ (line 461) | def __call__(self, s: str): class EnglishTextNormalizer (line 465) | class EnglishTextNormalizer: method __init__ (line 466) | def __init__(self): method __call__ (line 526) | def __call__(self, s: str): FILE: whisper/timing.py function median_filter (line 19) | def median_filter(x: torch.Tensor, filter_width: int): function backtrace (line 58) | def backtrace(trace: np.ndarray): function dtw_cpu (line 83) | def dtw_cpu(x: np.ndarray): function dtw_cuda (line 108) | def dtw_cuda(x, BLOCK_SIZE=1024): function dtw (line 141) | def dtw(x: torch.Tensor) -> np.ndarray: class WordTiming (line 155) | class WordTiming: function find_alignment (line 163) | def find_alignment( function merge_punctuations (line 245) | def merge_punctuations(alignment: List[WordTiming], prepended: str, appe... function add_word_timestamps (line 279) | def add_word_timestamps( FILE: whisper/tokenizer.py class Tokenizer (line 132) | class Tokenizer: method __post_init__ (line 142) | def __post_init__(self): method encode (line 161) | def encode(self, text, **kwargs): method decode (line 164) | def decode(self, token_ids: List[int], **kwargs) -> str: method decode_with_timestamps (line 168) | def decode_with_timestamps(self, token_ids: List[int], **kwargs) -> str: method eot (line 176) | def eot(self) -> int: method transcribe (line 180) | def transcribe(self) -> int: method translate (line 184) | def translate(self) -> int: method sot (line 188) | def sot(self) -> int: method sot_lm (line 192) | def sot_lm(self) -> int: method sot_prev (line 196) | def sot_prev(self) -> int: method no_speech (line 200) | def no_speech(self) -> int: method no_timestamps (line 204) | def no_timestamps(self) -> int: method timestamp_begin (line 208) | def timestamp_begin(self) -> int: method language_token (line 212) | def language_token(self) -> int: method to_language_token (line 219) | def to_language_token(self, language): method all_language_tokens (line 226) | def all_language_tokens(self) -> Tuple[int]: method all_language_codes (line 234) | def all_language_codes(self) -> Tuple[str]: method sot_sequence_including_notimestamps (line 238) | def sot_sequence_including_notimestamps(self) -> Tuple[int]: method non_speech_tokens (line 242) | def non_speech_tokens(self) -> Tuple[int]: method split_to_word_tokens (line 277) | def split_to_word_tokens(self, tokens: List[int]): method split_tokens_on_unicode (line 286) | def split_tokens_on_unicode(self, tokens: List[int]): method split_tokens_on_spaces (line 311) | def split_tokens_on_spaces(self, tokens: List[int]): function get_encoding (line 331) | def get_encoding(name: str = "gpt2", num_languages: int = 99): function get_tokenizer (line 367) | def get_tokenizer( FILE: whisper/transcribe.py function transcribe (line 38) | def transcribe( function cli (line 517) | def cli(): FILE: whisper/triton_ops.py function dtw_kernel (line 14) | def dtw_kernel( function median_kernel (line 44) | def median_kernel(filter_width: int): function median_filter_cuda (line 106) | def median_filter_cuda(x: torch.Tensor, filter_width: int): FILE: whisper/utils.py function make_safe (line 12) | def make_safe(string): function make_safe (line 19) | def make_safe(string): function exact_div (line 24) | def exact_div(x, y): function str2bool (line 29) | def str2bool(string): function optional_int (line 37) | def optional_int(string): function optional_float (line 41) | def optional_float(string): function compression_ratio (line 45) | def compression_ratio(text) -> float: function format_timestamp (line 50) | def format_timestamp( function get_start (line 71) | def get_start(segments: List[dict]) -> Optional[float]: function get_end (line 78) | def get_end(segments: List[dict]) -> Optional[float]: class ResultWriter (line 85) | class ResultWriter: method __init__ (line 88) | def __init__(self, output_dir: str): method __call__ (line 91) | def __call__( method write_result (line 103) | def write_result( class WriteTXT (line 109) | class WriteTXT(ResultWriter): method write_result (line 112) | def write_result( class SubtitlesWriter (line 119) | class SubtitlesWriter(ResultWriter): method iterate_result (line 123) | def iterate_result( method format_timestamp (line 230) | def format_timestamp(self, seconds: float): class WriteVTT (line 238) | class WriteVTT(SubtitlesWriter): method write_result (line 243) | def write_result( class WriteSRT (line 251) | class WriteSRT(SubtitlesWriter): method write_result (line 256) | def write_result( class WriteTSV (line 265) | class WriteTSV(ResultWriter): method write_result (line 277) | def write_result( class WriteJSON (line 287) | class WriteJSON(ResultWriter): method write_result (line 290) | def write_result( function get_writer (line 296) | def get_writer(