Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/allenai/OLMoASR
/ functions
Functions
377 in github.com/allenai/OLMoASR
⨍
Functions
377
◇
Types & classes
46
Method
forward
Forward pass through the complete model. Parameters ---------- mel : torch.Tensor Mel spectrogra
olmoasr/model.py:856
Function
gen_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
Function
generator
(text: str)
scripts/data/filtering/gen_video_samples.py:92
Function
get_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
Function
identify_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
Function
init_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
Function
init_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
Function
init_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
Function
init_worker
Initialize worker process with shared dataset. Args: dataset: The dataset to share across worker processes
scripts/data/processing/reseg_yodas.py:62
Method
install_hooks
(layer: nn.Module)
olmoasr/inf_model.py:447
Method
install_hooks
(layer: nn.Module)
olmoasr/model.py:958
Method
install_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
Method
install_kv_cache_hooks
Install hooks for key-value caching to enable efficient inference. The `MultiHeadAttention` module optionally accepts `kv_ca
olmoasr/model.py:925
Method
is_multilingual
(self)
olmoasr/inf_model.py:415
Method
is_multilingual
Check if the model is multilingual. Returns ------- bool True if model supports multiple languag
olmoasr/model.py:902
Method
load
Load audio files and transcripts from the dataset. Returns: Tuple[list, list]: A tuple containing: - List of audi
scripts/eval/eval.py:306
Method
load
Load LibriSpeech audio files and transcripts. Recursively searches for transcript files and maps them to corresponding FLAC audio fil
scripts/eval/eval.py:339
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Method
load
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
Function
load_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
Method
logits
( self, tokens: torch.Tensor, audio_features: torch.Tensor, padding_mask: torc
olmoasr/inf_model.py:397
Method
logits
Compute logits for given tokens and audio features. Parameters ---------- tokens : torch.Tensor
olmoasr/model.py:831
Function
long_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
Function
lr_lambda
(global_step: int)
scripts/training/train_yodas.py:703
Function
lr_lambda
(global_step: int)
scripts/training/train_fsdp_timestamps.py:801
Function
lr_lambda
(global_step: int)
scripts/training/train_timestamps.py:772
Function
main
Main function to process YODAS dataset resegmentation. Args: input_dir: Directory containing YODAS Arrow files audio_output_
scripts/data/processing/reseg_yodas.py:495
Function
main
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
Function
main
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
Function
main
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
Function
main
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
Function
main
Main training function for distributed Whisper model training with timestamps. Orchestrates the complete training pipeline including: - Distr
scripts/training/train_timestamps.py:2098
Function
main_transcribe
(inference_strategy, audio_file, timestamp_text, transcription_text)
demo/demo.py:297
Method
num_languages
(self)
olmoasr/inf_model.py:419
Method
num_languages
Get the number of languages supported by the model. Returns ------- int Number of supported lang
olmoasr/model.py:914
Function
open_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
Function
open_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
Function
open_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
Function
over_ctx_len
Check if transcript text exceeds model context length. Args: timestamps: List of (start, end) timestamp tuples transcript: Transc
olmoasr/utils.py:391
Function
parallel_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
Function
parallel_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
Function
parallel_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
Function
parallel_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
Function
parallel_preprocess_jsonl
Parallel wrapper for preprocess_jsonl function. Args: args: Tuple containing all arguments for preprocess_jsonl Returns:
olmoasr/preprocess.py:1654
Function
parallel_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
Method
preprocess_audio
Legacy method for backwards compatibility. Delegates to AudioProcessor for audio preprocessing. Maintained for compatibility with exi
scripts/eval/eval.py:1438
Function
preprocess_jsonls
Preprocess multiple JSONL files in parallel. Args: input_dir: Directory containing JSONL files to preprocess output_dir: Dir
olmoasr/preprocess.py:1669
Function
process_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
Function
process_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
Function
process_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
Function
process_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
Function
progress_hook
(block_num, block_size, total_size)
olmoasr/__init__.py:78
Function
remove_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
Function
reservoir_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
Function
reset
()
demo/demo.py:447
Method
save_to_cache
(module, _, output)
olmoasr/inf_model.py:439
Method
save_to_cache
(module, _, output)
olmoasr/model.py:950
Function
short_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
Function
text_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
Function
timestamps_valid
Validate that timestamps are within bounds and properly ordered. Args: timestamps: List of (start, end) timestamp tuples global_s
olmoasr/utils.py:453
Method
to_dict
Convert the machine segment to a dictionary representation. Returns: Dictionary containing all machine segment data
olmoasr/utils.py:648
Method
to_dict
Convert the counter to a dictionary representation. Returns: Dictionary containing all counter values
olmoasr/utils.py:699
Function
too_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
Function
too_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
Function
transcribe
(stream, new_chunk)
demo/live_demo.py:31
Function
trim_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
Function
valid_model_name
(name)
olmoasr/transcribe.py:529
Function
view_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
Function
write_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
← previous
301–377 of 377, ranked by callers