MCPcopy Create free account

hub / github.com/allenai/OLMoASR / functions

Functions377 in github.com/allenai/OLMoASR

Methodforward
Forward pass through the complete model. Parameters ---------- mel : torch.Tensor Mel spectrogra
olmoasr/model.py:856
Functiongen_video_samples
Main function to generate video samples from audio and transcript files. Args: wav_dir: Directory for temporary WAV files vi
scripts/data/filtering/gen_video_samples.py:391
Functiongenerator
(text: str)
scripts/data/filtering/gen_video_samples.py:92
Functionget_error_bars
Computes error bars for WER values from a CSV file. Args: csv_file (str): Path to the CSV file containing WER values. n_boot
notebooks/gen_error_bars.py:74
Functionidentify_text_language
Identify the language of manual text content. Args: content_dict: Dictionary containing manual text and length Returns:
scripts/data/filtering/data_tagger.py:394
Functioninit_tokenizer
Initialize tokenizer in each dataloader worker process. Sets up a global tokenizer instance for the worker process. This is called automatica
scripts/training/train_yodas.py:480
Functioninit_tokenizer
Initialize tokenizer in each dataloader worker process. Sets up a global tokenizer instance for the worker process. This is called automatica
scripts/training/train_fsdp_timestamps.py:580
Functioninit_tokenizer
Initialize tokenizer in each dataloader worker process. Sets up a global tokenizer instance for the worker process. This is called automatica
scripts/training/train_timestamps.py:551
Functioninit_worker
Initialize worker process with shared dataset. Args: dataset: The dataset to share across worker processes
scripts/data/processing/reseg_yodas.py:62
Methodinstall_hooks
(layer: nn.Module)
olmoasr/inf_model.py:447
Methodinstall_hooks
(layer: nn.Module)
olmoasr/model.py:958
Methodinstall_kv_cache_hooks
The `MultiHeadAttention` module optionally accepts `kv_cache` which stores the key and value tensors calculated for the previous posi
olmoasr/inf_model.py:422
Methodinstall_kv_cache_hooks
Install hooks for key-value caching to enable efficient inference. The `MultiHeadAttention` module optionally accepts `kv_ca
olmoasr/model.py:925
Methodis_multilingual
(self)
olmoasr/inf_model.py:415
Methodis_multilingual
Check if the model is multilingual. Returns ------- bool True if model supports multiple languag
olmoasr/model.py:902
Methodload
Load audio files and transcripts from the dataset. Returns: Tuple[list, list]: A tuple containing: - List of audi
scripts/eval/eval.py:306
Methodload
Load LibriSpeech audio files and transcripts. Recursively searches for transcript files and maps them to corresponding FLAC audio fil
scripts/eval/eval.py:339
Methodload
Load Artie Bias Corpus audio files and transcripts. Parses the TSV metadata file to extract audio file paths and their corresponding
scripts/eval/eval.py:394
Methodload
Load FLEURS dataset audio files and transcripts. Parses the test.tsv file to extract audio file paths and transcriptions for the Engl
scripts/eval/eval.py:436
Methodload
Load VoxPopuli audio files and transcripts. Parses the ASR test TSV file to extract audio file paths and normalized transcript texts
scripts/eval/eval.py:474
Methodload
Load CORAAL audio files and cleaned transcripts. Parses the CORAAL transcripts CSV and applies specialized text cleaning to handle di
scripts/eval/eval.py:552
Methodload
Load CHiME-6 audio segments and transcripts. Parses JSON transcript files to extract audio segment paths and their corresponding word
scripts/eval/eval.py:602
Methodload
Load WSJ audio extraction commands and transcripts. Parses Kaldi-format text and wav.scp files to create mappings between utterance I
scripts/eval/eval.py:652
Methodload
Load CallHome audio segments and transcripts. Delegates to the shared HUB5 data loading logic with English prefix to extract CallHome
scripts/eval/eval.py:705
Methodload
Load Switchboard audio segments and transcripts. Delegates to the shared HUB5 data loading logic with Switchboard prefix to extract S
scripts/eval/eval.py:738
Methodload
Load Kincaid46 audio files and transcripts. Parses the CSV metadata file and maps entries to corresponding M4A audio files using a ze
scripts/eval/eval.py:826
Methodload
Load CORAAL long-form audio files and transcripts. Parses the JSONL file to extract audio file paths and their corresponding full tra
scripts/eval/eval.py:871
Functionload_compressed_jsonl
Load data from a compressed JSONL file. Args: file_path: Path to the .jsonl.gz file Returns: List of JSON objects parse
scripts/data/filtering/tag_audio_lang.py:145
Methodlogits
( self, tokens: torch.Tensor, audio_features: torch.Tensor, padding_mask: torc
olmoasr/inf_model.py:397
Methodlogits
Compute logits for given tokens and audio features. Parameters ---------- tokens : torch.Tensor
olmoasr/model.py:831
Functionlong_form_eval
Evaluate ASR model performance on long-form transcription tasks. This evaluation function handles variable-length audio segments (typically longe
scripts/eval/eval.py:1906
Functionlr_lambda
(global_step: int)
scripts/training/train_yodas.py:703
Functionlr_lambda
(global_step: int)
scripts/training/train_fsdp_timestamps.py:801
Functionlr_lambda
(global_step: int)
scripts/training/train_timestamps.py:772
Functionmain
Main function to process YODAS dataset resegmentation. Args: input_dir: Directory containing YODAS Arrow files audio_output_
scripts/data/processing/reseg_yodas.py:495
Functionmain
Main entry point for the data tagging pipeline. Args: config_path: Path to YAML configuration file input_dir: Directory cont
scripts/data/filtering/data_tagger.py:1050
Functionmain
Main entry point for audio language assignment pipeline. This function orchestrates the entire process of assigning audio language tags
scripts/data/filtering/assign_audio_lang_data.py:276
Functionmain
Main training function for YODAS DDP model training. Orchestrates the complete DDP training pipeline for YODAS including: - Distributed train
scripts/training/train_yodas.py:2024
Functionmain
Main training function for FSDP Whisper model training with timestamps. Orchestrates the complete FSDP training pipeline including: - Distrib
scripts/training/train_fsdp_timestamps.py:2397
Functionmain
Main training function for distributed Whisper model training with timestamps. Orchestrates the complete training pipeline including: - Distr
scripts/training/train_timestamps.py:2098
Functionmain_transcribe
(inference_strategy, audio_file, timestamp_text, transcription_text)
demo/demo.py:297
Methodnum_languages
(self)
olmoasr/inf_model.py:419
Methodnum_languages
Get the number of languages supported by the model. Returns ------- int Number of supported lang
olmoasr/model.py:914
Functionopen_dicts_file
Load sample dictionaries from compressed YODAS dataset files. Currently only supports gzip (.gz) compressed JSONL files. Each line should con
scripts/training/train_yodas.py:506
Functionopen_dicts_file
Load sample dictionaries from compressed files. Supports loading JSONL data from either gzip (.gz) or zstandard (.zst) compressed files. Each
scripts/training/train_fsdp_timestamps.py:606
Functionopen_dicts_file
Load sample dictionaries from compressed files. Supports loading JSONL data from either gzip (.gz) or zstandard (.zst) compressed files. Each
scripts/training/train_timestamps.py:577
Functionover_ctx_len
Check if transcript text exceeds model context length. Args: timestamps: List of (start, end) timestamp tuples transcript: Transc
olmoasr/utils.py:391
Functionparallel_create_segment
Wrapper function for parallel processing of audio segmentation. Unpacks arguments and calls create_segment for use with multiprocessing.
scripts/eval/get_eval_set.py:560
Functionparallel_gen_file_list
Wrapper function for parallel file list generation. Args: args: Tuple of (seg_dir, video_dir, wav_dir) Returns: List of
scripts/data/filtering/gen_video_samples.py:237
Functionparallel_generate_segment
Wrapper function for parallel segment generation. Args: args: Tuple of (segment_info, output_dir) Returns: Generated se
scripts/data/processing/reseg_yodas.py:421
Functionparallel_generate_video
Wrapper function for parallel video generation. Args: args: Tuple of (npy_file, transcript_file, output_file, wav_file) Returns
scripts/data/filtering/gen_video_samples.py:168
Functionparallel_preprocess_jsonl
Parallel wrapper for preprocess_jsonl function. Args: args: Tuple containing all arguments for preprocess_jsonl Returns:
olmoasr/preprocess.py:1654
Functionparallel_process_file
Wrapper function for parallel processing of transcript files. Args: file_path: Path to the transcript file Returns: Dic
scripts/data/processing/text_to_jsonl.py:154
Methodpreprocess_audio
Legacy method for backwards compatibility. Delegates to AudioProcessor for audio preprocessing. Maintained for compatibility with exi
scripts/eval/eval.py:1438
Functionpreprocess_jsonls
Preprocess multiple JSONL files in parallel. Args: input_dir: Directory containing JSONL files to preprocess output_dir: Dir
olmoasr/preprocess.py:1669
Functionprocess_data
Process audio language identification from a directory. This function loads transcript data from all .jsonl.gz files in the input directory,
scripts/data/filtering/tag_audio_lang.py:259
Functionprocess_file_wrapper
Wrapper function for parallel processing of JSONL files. This function unpacks arguments and calls the main file processing function. It
scripts/data/filtering/assign_audio_lang_data.py:231
Functionprocess_jsonl_file
Process a single JSONL file with the configured tagging pipeline. Args: jsonl_path: Path to the input JSONL.gz file config_d
scripts/data/filtering/data_tagger.py:714
Functionprocess_single_jsonl_file
Process a single JSONL file with filtering and optional subsampling. Args: jsonl_path: Path to the input JSONL.gz file outpu
scripts/data/filtering/process_tagged_data.py:350
Functionprogress_hook
(block_num, block_size, total_size)
olmoasr/__init__.py:78
Functionremove_after_endoftext
Remove everything after the first instance of "<|endoftext|>" in a string. Args: text: The string to process Returns: The st
olmoasr/utils.py:14
Functionreservoir_sample_chunk
Perform reservoir sampling on a chunk of files. This function processes a subset of files and maintains a reservoir sample of the specif
scripts/data/filtering/reservoir_sample.py:135
Functionreset
()
demo/demo.py:447
Methodsave_to_cache
(module, _, output)
olmoasr/inf_model.py:439
Methodsave_to_cache
(module, _, output)
olmoasr/model.py:950
Functionshort_form_eval
Evaluate ASR model performance on short-form transcription tasks. This is the main evaluation function for fixed-length audio segments (typically
scripts/eval/eval.py:1648
Functiontext_to_jsonl
Convert transcript files to compressed JSONL format. This function processes transcript files (single file, directory, or list of files)
scripts/data/processing/text_to_jsonl.py:287
Functiontimestamps_valid
Validate that timestamps are within bounds and properly ordered. Args: timestamps: List of (start, end) timestamp tuples global_s
olmoasr/utils.py:453
Methodto_dict
Convert the machine segment to a dictionary representation. Returns: Dictionary containing all machine segment data
olmoasr/utils.py:648
Methodto_dict
Convert the counter to a dictionary representation. Returns: Dictionary containing all counter values
olmoasr/utils.py:699
Functiontoo_short_audio
Check if audio array duration is too short. Args: audio_arr: Audio data as numpy array sample_rate: Audio sample rate in Hz
olmoasr/utils.py:498
Functiontoo_short_audio_text
Check if audio duration between timestamps is too short. Args: start: Start timestamp in HH:MM:SS.mmm format end: End timestamp i
olmoasr/utils.py:512
Functiontranscribe
(stream, new_chunk)
demo/live_demo.py:31
Functiontrim_audio
Trim an audio file to specified start and end timestamps. Trims the audio file to the specified start and end timestamps and optionally saves
olmoasr/utils.py:100
Functionvalid_model_name
(name)
olmoasr/transcribe.py:529
Functionview_video
Create a Video object for display in Jupyter notebooks. Args: output_file: Path to the video file Returns: IPython Vide
scripts/data/filtering/gen_video_samples.py:181
Functionwrite_segment
Write a segment of the transcript to a file. Args: audio_begin: Beginning timestamp of the audio segment timestamps: List of (sta
olmoasr/utils.py:311
← previous301–377 of 377, ranked by callers