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
↓ 1 callers
Function
apply_numeric_filter
Apply numeric filtering logic with bounds checking. Args: tag_value: The numeric value to test lower_bound: Optional minimum
scripts/data/filtering/process_tagged_data.py:266
↓ 1 callers
Function
apply_tagging_pipeline
Apply the configured tagging pipeline to content. Args: content_dict: Content dictionary with data to tag config: Configurat
scripts/data/filtering/data_tagger.py:895
↓ 1 callers
Function
assign_audio_language_to_file
Assign audio language tags to all entries in a single JSONL file. This function loads a JSONL file and assigns audio language tags to each v
scripts/data/filtering/assign_audio_lang_data.py:180
↓ 1 callers
Function
calc_pred_wer
Calculate Word Error Rate (WER) and error statistics for YODAS predictions. Normalizes target and predicted text, then computes WER and detailed
scripts/training/train_yodas.py:1072
↓ 1 callers
Function
calc_pred_wer
Calculate Word Error Rate (WER) and error statistics for predictions. Normalizes target and predicted text, then computes WER and detailed error
scripts/training/train_timestamps.py:1125
↓ 1 callers
Function
calculate_percentiles
Calculate percentiles from a list of values. Args: values: List of values to calculate percentiles for Returns: List of
scripts/data/filtering/reservoir_sample.py:249
↓ 1 callers
Function
calculate_transcript_length
Calculate the total length of a transcript in seconds. Args: transcript_start: Start times for transcript segments (format depends o
scripts/data/processing/text_to_jsonl.py:71
↓ 1 callers
Function
check_over_ctx_len
Check if transcript text exceeds model context length. Validates whether the transcript tokens fit within the model's context window for
scripts/data/processing/reseg_yodas.py:94
↓ 1 callers
Function
chunk_mach_transcript
Segment machine-generated transcripts aligned with manual transcript timestamps. Processes machine-generated transcript data by aligning it
olmoasr/preprocess.py:1083
↓ 1 callers
Method
clean_coraal_text
Clean CORAAL dataset text according to corpus conventions. Applies CORAAL-specific text normalization including dialect word mapping,
scripts/eval/eval.py:228
↓ 1 callers
Function
clean_subtitle_text
Clean and modify subtitle text content using regex patterns. This function removes common subtitle artifacts including: - Speaker names
scripts/data/filtering/process_tagged_data.py:304
↓ 1 callers
Function
cleanup
Cleanup function for distributed YODAS DDP training. Clears GPU memory cache and destroys the distributed process group to properly shut down
scripts/training/train_yodas.py:2014
↓ 1 callers
Function
cleanup
Cleanup function for the distributed training
scripts/training/train_fsdp_timestamps.py:2391
↓ 1 callers
Function
cleanup
Cleanup function for the distributed training
scripts/training/train_timestamps.py:2092
↓ 1 callers
Function
cli
()
olmoasr/transcribe.py:526
↓ 1 callers
Function
collect_and_merge_results
Collect and merge reservoir sampling results from worker processes. Args: result_queue: Queue containing paths to temporary result f
scripts/data/filtering/reservoir_sample.py:214
↓ 1 callers
Function
combine_language_mappings
Discover and combine all language mapping files in a directory. Args: mapping_dir: Directory containing language mapping files
scripts/data/filtering/assign_audio_lang_data.py:69
↓ 1 callers
Function
convert_checkpoint_to_hf
Convert OLMoASR checkpoint to HuggingFace format using subprocess.
demo/demo.py:65
↓ 1 callers
Function
convert_openai_whisper_to_tfms
( checkpoint_path, pytorch_dump_folder_path )
demo/convert_openai_to_hf.py:185
↓ 1 callers
Function
convert_tiktoken_bpe_to_hf
(tiktoken_url: str)
demo/convert_openai_to_hf.py:272
↓ 1 callers
Function
convert_tiktoken_to_hf
( multilingual: bool = True, num_languages: int = 100, time_precision=0.02 )
demo/convert_openai_to_hf.py:291
↓ 1 callers
Method
create_loader
Create appropriate dataset loader for the specified evaluation set. Factory method that instantiates the correct dataset loader class based o
scripts/eval/eval.py:947
↓ 1 callers
Function
create_segment
Create audio segment from source audio based on timing information. Extracts a time-based segment from a source audio file and saves it
scripts/eval/get_eval_set.py:512
↓ 1 callers
Function
create_subtitle_generator
Create a text clip generator function for subtitles. Returns: Function that creates TextClip objects with consistent styling
scripts/data/filtering/gen_video_samples.py:84
↓ 1 callers
Function
decode_audio_bytes
(audio_bytes: bytes)
notebooks/wds_explore.py:36
↓ 1 callers
Function
decode_text_bytes
(text_bytes: bytes)
notebooks/wds_explore.py:42
↓ 1 callers
Function
decode_with_fallback
(segment: torch.Tensor)
olmoasr/transcribe.py:193
↓ 1 callers
Function
discover_jsonl_files
Discover all JSONL.gz files in the input directory. Args: input_dir: Directory to search for JSONL files Returns: List
scripts/data/filtering/assign_audio_lang_data.py:251
↓ 1 callers
Function
discover_transcript_files
Discover transcript files in a directory. Args: input_path: Directory path to search pattern: File pattern to match (default
scripts/data/processing/text_to_jsonl.py:167
↓ 1 callers
Function
display_hitlist_report
Display a formatted report of filtering results. This function generates a step-by-step report showing how many items were modified or f
scripts/data/filtering/process_tagged_data.py:131
↓ 1 callers
Function
display_percentile_table
Display percentiles in a formatted table. Args: percentiles: List of percentile values to display
scripts/data/filtering/reservoir_sample.py:309
↓ 1 callers
Function
download_olmoasr_checkpoint
Download OLMoASR checkpoint from HuggingFace hub.
demo/demo.py:40
↓ 1 callers
Function
ensure_checkpoint_dir
Ensure the checkpoint directory exists.
demo/demo.py:34
↓ 1 callers
Function
extract_machine_text
Extract text from machine-generated subtitle content. Args: machine_content: Raw machine subtitle content (VTT format) Returns:
scripts/data/filtering/data_tagger.py:178
↓ 1 callers
Function
extract_manual_text
Extract text from manual subtitle content. Args: manual_content: Raw manual subtitle content (VTT or SRT format) Returns:
scripts/data/filtering/data_tagger.py:143
↓ 1 callers
Function
extract_ts_list
Extract timestamp pairs for a list of utterance IDs. Args: utt_id_list: List of utterance IDs Returns: List of (start,
scripts/data/processing/reseg_yodas.py:216
↓ 1 callers
Method
forward
(self, x: Tensor)
olmoasr/inf_model.py:55
↓ 1 callers
Method
forward
Forward pass through linear layer with dtype casting. Parameters ---------- x : Tensor Input ten
olmoasr/model.py:83
↓ 1 callers
Function
gen_file_list
Generate list of file paths for video processing from a segment directory. Args: seg_dir: Directory containing .npy and .srt files
scripts/data/filtering/gen_video_samples.py:194
↓ 1 callers
Function
gen_pred
Generate predictions from model logits and decode them to text for YODAS. Takes model output logits and ground truth targets, converts logits to
scripts/training/train_yodas.py:1024
↓ 1 callers
Function
gen_pred
Generate predictions from model logits and decode them to text. Takes model output logits and ground truth targets, converts logits to prediction
scripts/training/train_timestamps.py:1077
↓ 1 callers
Method
gen_token_ranges
Convert timestamp pairs to token index ranges for YODAS training. Converts floating-point timestamps (in seconds) to Whisper timestamp token
scripts/training/train_yodas.py:194
↓ 1 callers
Function
generate_new_segment
Generate a new audio segment from combined utterances. Args: segment_info: Tuple of (segment_indices, segment_id) output_dir
scripts/data/processing/reseg_yodas.py:331
↓ 1 callers
Function
generate_processing_report
Generate a comprehensive processing report. Args: files_processed: Number of files processed processing_time: Total processi
scripts/data/filtering/process_tagged_data.py:569
↓ 1 callers
Function
generate_summary_report
Generate a comprehensive summary report. Args: output_dir: Directory to save the report config_path: Path to configuration f
scripts/data/filtering/data_tagger.py:999
↓ 1 callers
Function
generate_video
Generate a video with subtitles and audio from numpy array and transcript. Args: npy_file: Path to numpy file containing audio data
scripts/data/filtering/gen_video_samples.py:105
↓ 1 callers
Function
get_error_bars_overall
Computes error bars for WER values from multiple CSV files in a directory. Args: data_dir (str): Path to the directory containing CS
notebooks/gen_error_bars.py:90
↓ 1 callers
Function
get_mach_seg_text
Extract text content from a machine-generated segment. Args: mach_segment: MachineSegment object containing machine transcript conte
olmoasr/utils.py:775
↓ 1 callers
Function
get_seg_text
Extract text content from a segment. Args: segment: Segment object containing transcript content Returns: Extracted tex
olmoasr/utils.py:749
↓ 1 callers
Function
hf_chunk_transcribe
(audio_file, timestamp_text, transcription_text)
demo/demo.py:163
↓ 1 callers
Function
hf_process_chunks
(chunks)
demo/demo.py:342
↓ 1 callers
Function
hf_seq_process_chunks
(chunks)
demo/demo.py:376
↓ 1 callers
Function
hf_seq_transcribe
(audio_file, timestamp_text, transcription_text)
demo/demo.py:250
↓ 1 callers
Function
identify_segment_languages
Identify languages for audio segments using the classification model. Args: model: Pre-trained SpeechBrain language identification m
scripts/data/filtering/tag_audio_lang.py:188
↓ 1 callers
Method
increment
Atomically increment the counter by 1. Returns: The new value after incrementing Note: This operati
scripts/data/filtering/reservoir_sample.py:81
↓ 1 callers
Function
initialize_models
Initialize both HuggingFace and OLMoASR models.
demo/demo.py:118
↓ 1 callers
Function
load_ckpt
Loads the model (DDP) checkpoint to resume training Args: exp_name: The experiment name. run_id: The run ID rank: The ran
scripts/training/train_yodas.py:922
↓ 1 callers
Function
load_ckpt
Loads the model (DDP) checkpoint to resume training Args: exp_name: The experiment name. run_id: The run ID rank: The ran
scripts/training/train_fsdp_timestamps.py:1024
↓ 1 callers
Function
load_ckpt
Loads the model (DDP) checkpoint to resume training Args: exp_name: The experiment name. run_id: The run ID rank: The ran
scripts/training/train_timestamps.py:975
↓ 1 callers
Function
load_config
Load configuration from YAML file. Args: config_path: Path to the YAML configuration file Returns: Dictionary containin
scripts/data/filtering/process_tagged_data.py:107
↓ 1 callers
Function
load_config
Load configuration from YAML file. Args: config_path: Path to the YAML configuration file Returns: Dictionary containin
scripts/data/filtering/data_tagger.py:119
↓ 1 callers
Function
load_jsonl_data
Load data from a compressed JSONL file. Args: jsonl_file_path: Path to the compressed JSONL file Returns: List of JSON
scripts/data/filtering/assign_audio_lang_data.py:108
↓ 1 callers
Function
load_jsonl_file
Load and parse a JSONL file. Args: file_path: Path to the JSONL file to load Returns: List of parsed JSON objects
scripts/data/filtering/reservoir_sample.py:101
↓ 1 callers
Function
load_language_mapping
Load language mapping from a compressed JSON file. Args: mapping_file_path: Path to the compressed JSON file containing language map
scripts/data/filtering/assign_audio_lang_data.py:40
↓ 1 callers
Function
log_missing_language
Log information about a video with missing language mapping. Args: video_id: ID of the video missing language mapping jsonl_
scripts/data/filtering/assign_audio_lang_data.py:157
↓ 1 callers
Function
log_tbl
Log training examples to Weights & Biases table for YODAS training. Creates detailed logging entries for training samples including audio, pr
scripts/training/train_yodas.py:1146
↓ 1 callers
Function
log_tbl
Log training examples to Weights & Biases table. Creates detailed logging entries for training samples including audio, predictions, targets,
scripts/training/train_fsdp_timestamps.py:1280
↓ 1 callers
Function
log_tbl
Log training examples to Weights & Biases table. Creates detailed logging entries for training samples including audio, predictions, targets,
scripts/training/train_timestamps.py:1199
↓ 1 callers
Function
main
Main entry point for tagged data processing pipeline. This function orchestrates the entire processing workflow: 1. Discovers JSONL file
scripts/data/filtering/process_tagged_data.py:671
↓ 1 callers
Function
main
Perform parallel reservoir sampling on JSONL files in a directory. This function implements a distributed reservoir sampling algorithm that:
scripts/data/filtering/reservoir_sample.py:359
↓ 1 callers
Function
make_linear_from_emb
(emb)
demo/convert_openai_to_hf.py:140
↓ 1 callers
Function
merge_man_mach_segs
Merge manual and machine transcript segments. Args: transcript: Dictionary containing transcript content and metadata shard_
olmoasr/preprocess.py:1341
↓ 1 callers
Function
npy_to_wav
Convert numpy audio array to WAV file. Args: npy_file: Path to input numpy file containing audio data wav_file: Path to outp
scripts/data/filtering/gen_video_samples.py:59
↓ 1 callers
Function
olmoasr_process_chunks
(chunks)
demo/demo.py:306
↓ 1 callers
Function
olmoasr_seq_transcribe
(audio_file, timestamp_text, transcription_text)
demo/demo.py:208
↓ 1 callers
Function
open_dicts_file
Read sample dictionaries from a JSONL file. Args: samples_dicts_file: Path to JSONL file containing sample dictionaries Returns
scripts/data/filtering/gen_video_samples.py:252
↓ 1 callers
Function
parse_arguments
Parse command-line arguments. Returns: Parsed arguments namespace Raises: SystemExit: If argument parsing fails
scripts/data/filtering/process_tagged_data.py:860
↓ 1 callers
Function
parse_arguments
Parse command-line arguments. Returns: Parsed arguments namespace Raises: SystemExit: If argument parsing fails
scripts/data/filtering/reservoir_sample.py:484
↓ 1 callers
Function
parse_subtitle_content
Parse subtitle content based on format detection. Args: transcript_string: Raw subtitle content string Returns: Parsed
scripts/data/filtering/process_tagged_data.py:177
↓ 1 callers
Function
partition_files_into_chunks
Partition files into approximately equal chunks for parallel processing. Args: files: List of file paths to partition num_ch
scripts/data/filtering/reservoir_sample.py:281
↓ 1 callers
Function
prepare_data
Prepares the training dataset and dataloader for FSDP training. Creates an AudioTextDataset from sample dictionaries and sets up a distributed
scripts/training/train_fsdp_timestamps.py:685
↓ 1 callers
Function
prepare_data
Prepares the training dataset and dataloader. Creates an AudioTextDataset from sample dictionaries and sets up a distributed dataloader for t
scripts/training/train_timestamps.py:656
↓ 1 callers
Function
prepare_dataloader
Prepares the distributed dataloader for YODAS DDP training. Creates a DistributedSampler and DataLoader configured for distributed training.
scripts/training/train_yodas.py:524
↓ 1 callers
Function
prepare_dataloader
Prepares the distributed dataloader for FSDP training. Creates a DistributedSampler and DataLoader configured for distributed training. The s
scripts/training/train_fsdp_timestamps.py:636
↓ 1 callers
Function
prepare_dataloader
Prepares the distributed dataloader for DDP training. Creates a DistributedSampler and DataLoader configured for distributed training. The sa
scripts/training/train_timestamps.py:607
↓ 1 callers
Function
prepare_input_files
Prepare list of input files from various input types. Args: input_path: Single file path, directory path, or list of file paths
scripts/data/processing/text_to_jsonl.py:194
↓ 1 callers
Function
prepare_optim
Prepares the AdamW optimizer for YODAS DDP training. Creates an AdamW optimizer with the specified hyperparameters for training the DDP-wrapp
scripts/training/train_yodas.py:636
↓ 1 callers
Function
prepare_optim
Prepares the optimizer for training Prepares the AdamW optimizer for training Args: model: The model to train lr: The learni
scripts/training/train_fsdp_timestamps.py:735
↓ 1 callers
Function
prepare_optim
Prepares the optimizer for training Prepares the AdamW optimizer for training Args: model: The model to train lr: The learni
scripts/training/train_timestamps.py:706
↓ 1 callers
Function
preprocess
(sample, tokenizer, n_text_ctx)
notebooks/wds_explore.py:105
↓ 1 callers
Function
preprocess_audio
(audio_arr: np.ndarray)
notebooks/wds_explore.py:58
↓ 1 callers
Method
preprocess_audio
Preprocesses audio data for YODAS training. Loads audio using soundfile (supporting various formats), handles multi-channel audio, op
scripts/training/train_yodas.py:237
↓ 1 callers
Method
preprocess_audio
Preprocesses the audio data for the model. Loads the audio file, pads or trims the audio data, and computes the log mel spectrogram.
scripts/training/train_fsdp_timestamps.py:204
↓ 1 callers
Method
preprocess_audio
Preprocesses the audio data for the model. Loads the audio file, pads or trims the audio data, and computes the log mel spectrogram.
scripts/training/train_timestamps.py:175
↓ 1 callers
Function
preprocess_jsonl
Preprocess a JSONL file into segments. Args: json_file: Path to the JSONL file to preprocess shard: Identifier for the shard
olmoasr/preprocess.py:1499
↓ 1 callers
Function
preprocess_text
(transcript_string: str, tokenizer: whisper.tokenizer.Tokenizer, n_text_ctx: int)
notebooks/wds_explore.py:65
↓ 1 callers
Method
preprocess_text
Preprocesses YODAS text data with timestamp-aware tokenization. Handles transcript lists with timing information, supporting both timestamp
scripts/training/train_yodas.py:284
↓ 1 callers
Method
preprocess_text
Preprocesses the text data for the model. Reads transcript data, tokenizes it, and creates input/target sequences with optional timestamps.
scripts/training/train_fsdp_timestamps.py:267
↓ 1 callers
Method
preprocess_text
Preprocesses the text data for the model. Reads transcript data, tokenizes it, and creates input/target sequences with optional timestamps.
scripts/training/train_timestamps.py:238
↓ 1 callers
Function
process_arrow_file
Process a single Arrow file from the YODAS dataset. Args: arrow_file: Path to the Arrow file audio_output_dir: Directory for
scripts/data/processing/reseg_yodas.py:434
← previous
next →
101–200 of 377, ranked by callers