MCPcopy Create free account

hub / github.com/allenai/OLMoASR / functions

Functions377 in github.com/allenai/OLMoASR

↓ 29 callersMethodread
Read the transcript file based on its extension. Returns: Tuple of (transcript_dict, start_timestamp, end_timestamp) Rai
olmoasr/utils.py:277
↓ 28 callersMethodload
Load AMI corpus audio files and transcripts. Parses the text file to extract utterance IDs and maps them to corresponding audio files
scripts/eval/eval.py:512
↓ 16 callersMethodadd_attr
Add a new attribute to the segment. Args: key: The attribute name value: The attribute value
olmoasr/utils.py:605
↓ 7 callersMethoddevice
Get the device of the model. Returns ------- torch.device Device where the model parameters are
olmoasr/model.py:890
↓ 7 callersFunctionload_model
Load a OLMoASR model Parameters ---------- name : str one of the official model names listed in MODEL2LINK, or path
olmoasr/__init__.py:97
↓ 6 callersMethod__init__
( self, in_features: int, out_features: int, bias: bool = True, device
olmoasr/inf_model.py:41
↓ 6 callersMethod__init__
Initialize Linear layer with Kaiming normal initialization. Parameters ---------- in_features : int
olmoasr/model.py:53
↓ 5 callersFunctionconvert_to_milliseconds
Convert a timestamp in HH:MM:SS.mmm format to milliseconds. Args: timestamp: Timestamp in the format HH:MM:SS.mmm Returns: T
olmoasr/utils.py:31
↓ 5 callersMethodto_dict
Convert the segment to a dictionary representation. Returns: Dictionary containing all segment data
olmoasr/utils.py:582
↓ 4 callersFunctionadjust_timestamp
Adjust a timestamp by a specified number of milliseconds. Args: timestamp: Timestamp in HH:MM:SS.mmm format milliseconds: Number
olmoasr/utils.py:72
↓ 4 callersFunctionextract_ts
Extract timestamp information from utterance ID. Args: utt_id: Utterance ID containing timestamp information extract_type: T
scripts/data/processing/reseg_yodas.py:168
↓ 4 callersMethodpreprocess_audio
Preprocess audio waveform for validation. Resamples audio to 16kHz if needed, pads/trims to 30 seconds, and computes log mel spectrog
scripts/training/train_fsdp_timestamps.py:2030
↓ 4 callersMethodpreprocess_text
Preprocess text for validation. Tokenizes text using Whisper tokenizer, handles empty text with no-speech token, and creates input/ta
scripts/training/train_fsdp_timestamps.py:2061
↓ 4 callersFunctiontimestamp_to_ms
Convert timestamp string to milliseconds for audio processing. Converts time format used in CHiME-6 transcripts (HH:MM:SS.mmm) to
scripts/eval/get_eval_set.py:490
↓ 3 callersFunctionaggregate_statistics
Aggregate statistics from multiple processing results. Args: statistics_list: List of statistics dictionaries Returns:
scripts/data/filtering/data_tagger.py:948
↓ 3 callersFunctionchunk_data
Segment audio and transcript data into chunks of up to 30 seconds. This function takes a transcript dictionary and segments it into chunks t
olmoasr/preprocess.py:30
↓ 3 callersMethodextract_text
Extract the text from the transcript dictionary. Args: transcript: Transcript as a dictionary mapping (start, end) tuples to text
olmoasr/utils.py:293
↓ 3 callersFunctionget_end
(segments: List[dict])
olmoasr/transcribe.py:36
↓ 3 callersFunctionget_eval_set
Download and prepare evaluation datasets for ASR evaluation. This function handles the automated downloading, extraction, and preprocessing o
scripts/eval/get_eval_set.py:92
↓ 3 callersFunctionis_segment_anomaly
(segment: Optional[dict])
olmoasr/transcribe.py:337
↓ 3 callersMethodload_and_preprocess_audio
Load and preprocess audio file with optional time-based segmentation. Loads an audio file, optionally extracts a time segment, pads/trims to
scripts/eval/eval.py:125
↓ 3 callersMethodpreprocess_hf_audio
Preprocess audio arrays from HuggingFace datasets. Processes raw audio waveforms from HuggingFace dataset format, handling resampling
scripts/eval/eval.py:166
↓ 3 callersFunctionsave_ckpt
Save model (DDP) checkpoint Saves non-DDP and DDP model checkpoints to checkpoints/{exp_name}_{run_id} directory in the format of {file_name}_{mo
scripts/training/train_yodas.py:841
↓ 3 callersFunctionsave_ckpt
Save model (DDP) checkpoint Saves non-DDP and DDP model checkpoints to checkpoints/{exp_name}_{run_id} directory in the format of {file_name}_{mo
scripts/training/train_timestamps.py:894
↓ 3 callersFunctionstereo_to_mono
(waveform)
demo/demo.py:152
↓ 2 callersFunction_add_to_wandb_table
Add evaluation results to WandB table for detailed logging. Computes per-sample metrics and adds audio examples with predictions and ground t
scripts/eval/eval.py:2142
↓ 2 callersMethod_convert_to_token_idx
Convert timestamp to token index. Args: timestamp: Timestamp in string or millisecond format timestamp_begin: Startin
scripts/training/train_fsdp_timestamps.py:249
↓ 2 callersMethod_convert_to_token_idx
Convert timestamp to token index. Args: timestamp: Timestamp in string or millisecond format timestamp_begin: Startin
scripts/training/train_timestamps.py:220
↓ 2 callersMethod_load_hub5_data
Common logic for CallHome and SwitchBoard datasets. Parses HUB5 STM format files to extract audio segments with precise timing inform
scripts/eval/eval.py:751
↓ 2 callersFunction_log_results
Log evaluation results to multiple output destinations. Handles comprehensive logging of evaluation metrics to console, files, and WandB base
scripts/eval/eval.py:2179
↓ 2 callersFunction_perform_subsampling
Perform subsampling on a list of lines. Args: lines: List of data lines to subsample subsample_size: Number of samples to ke
scripts/data/filtering/process_tagged_data.py:457
↓ 2 callersMethod_read_transcript_file
Read transcript file and extract timing and text data. Args: file_type: Type of transcript file ('vtt' or 'srt') Returns
olmoasr/utils.py:215
↓ 2 callersFunction_safe_normalize_text
Safely normalize text with error handling. Args: text: Text to normalize normalizer: Text normalizer Returns: N
scripts/data/filtering/data_tagger.py:328
↓ 2 callersFunctionbootstrap_sampling
Performs bootstrapping on the given data. Args: data (np.ndarray): The original data array. n_bootstrap (int): Number of boo
notebooks/gen_error_bars.py:31
↓ 2 callersFunctioncalc_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_fsdp_timestamps.py:1206
↓ 2 callersFunctioncalculate_difference
Calculate the difference between two timestamps in milliseconds. Args: timestamp1: First timestamp in HH:MM:SS.mmm format timesta
olmoasr/utils.py:50
↓ 2 callersFunctionchunk_transcript_only
Segment transcript data without corresponding audio files. Processes transcript-only data by chunking the text content into segments. Ca
olmoasr/preprocess.py:1001
↓ 2 callersFunctioncompute_statistics
Computes mean, standard deviation, and standard error from bootstrap means. Args: bootstrap_means (np.ndarray): Array of bootstrap s
notebooks/gen_error_bars.py:51
↓ 2 callersFunctionevaluate
Synchronous evaluation loop for YODAS DDP training. Evaluates the model on standard datasets (LibriSpeech clean/other) using Whisper's decode
scripts/training/train_yodas.py:1784
↓ 2 callersFunctionevaluate
Evaluation loop with Word Error Rate (WER) calculation on multiple datasets. Evaluates the model on provided evaluation datasets using Whisper's
scripts/training/train_timestamps.py:1835
↓ 2 callersFunctionextract_file_info
Extract file information from file path. Args: file_path: Path to the transcript file Returns: Dictionary containing fi
scripts/data/processing/text_to_jsonl.py:54
↓ 2 callersFunctionextract_id
Extract base ID from utterance ID by removing segment numbers. Args: utt_id: Full utterance ID (e.g., "speaker-audio-12345-start-end
scripts/data/processing/reseg_yodas.py:73
↓ 2 callersFunctiongen_inf_ckpt
(ckpt_path: str, save_path: str)
scripts/eval/gen_inf_ckpt.py:4
↓ 2 callersFunctiongen_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_fsdp_timestamps.py:1158
↓ 2 callersMethodinit_wandb
Initialize WandB run for evaluation experiment tracking. Sets up a WandB run with appropriate configuration for ASR evaluation, inclu
scripts/eval/eval.py:1491
↓ 2 callersFunctionload_data
Loads the WER values from a CSV file. Args: csv_file (str): Path to the CSV file. column_name (str): The name of the column
notebooks/gen_error_bars.py:9
↓ 2 callersFunctionnew_segment
( *, start: float, end: float, tokens: torch.Tensor, result: DecodingResult )
olmoasr/transcribe.py:255
↓ 2 callersFunctionnext_words_segment
(segments: List[dict])
olmoasr/transcribe.py:345
↓ 2 callersFunctionparse_subtitle_content
Parse subtitle content into an iterable format. Args: content: Raw subtitle content subtitle_filename: Filename to determine
scripts/data/filtering/data_tagger.py:261
↓ 2 callersFunctionprepare_data
Prepares the YODAS training dataset from HuggingFace datasets. Loads YODAS datasets from multiple subdirectories, concatenates them into a single
scripts/training/train_yodas.py:573
↓ 2 callersFunctionprepare_sched
Prepares the learning rate scheduler for YODAS DDP training. Creates a LambdaLR scheduler with linear warmup and cosine decay. Also calculates
scripts/training/train_yodas.py:669
↓ 2 callersFunctionprepare_sched
Prepares the learning rate scheduler for FSDP training. Creates a LambdaLR scheduler with linear warmup and cosine decay. Also calculates gra
scripts/training/train_fsdp_timestamps.py:767
↓ 2 callersFunctionprepare_sched
Prepares the learning rate scheduler for training. Creates a LambdaLR scheduler with linear warmup and cosine decay. Also calculates gradient
scripts/training/train_timestamps.py:738
↓ 2 callersFunctionrun_async_eval
Launch asynchronous evaluation subprocess for YODAS DDP training. Starts evaluation in a separate process to avoid blocking training. Only th
scripts/training/train_yodas.py:1951
↓ 2 callersFunctionrun_async_eval
Launch asynchronous evaluation subprocess for FSDP training. Starts evaluation in a separate process to avoid blocking training. Only the mai
scripts/training/train_fsdp_timestamps.py:2312
↓ 2 callersFunctionrun_async_eval
Launch asynchronous evaluation subprocess. Starts evaluation in a separate process to avoid blocking training. Only the main process (rank 0)
scripts/training/train_timestamps.py:2013
↓ 2 callersFunctionsave_ckpt
Save model (DDP) checkpoint Saves non-DDP and DDP model checkpoints to checkpoints/{exp_name}_{run_id} directory in the format of {file_name}_{mo
scripts/training/train_fsdp_timestamps.py:930
↓ 2 callersFunctionsave_processing_log
Save processing report to a log file. Args: report: Report content to save output_dir: Directory to save the log file
scripts/data/filtering/process_tagged_data.py:635
↓ 2 callersFunctionsetup
Initializes the distributed process group for DDP training. Sets the CUDA device for the current process and initializes the NCCL process gro
scripts/training/train_yodas.py:493
↓ 2 callersFunctionsum_counters
Sum multiple SegmentCounter objects efficiently. Args: counters: List of SegmentCounter objects to sum Returns: New Seg
olmoasr/utils.py:716
↓ 2 callersMethodvalue
Get the current counter value.
scripts/data/filtering/reservoir_sample.py:96
↓ 1 callersFunction_bpe
(mergeable_ranks, token: bytes, max_rank=None)
demo/convert_openai_to_hf.py:255
↓ 1 callersMethod_build_timestamp_sequence
Build sequence with timestamps. Returns None if timestamps are invalid.
scripts/training/train_fsdp_timestamps.py:496
↓ 1 callersMethod_build_timestamp_sequence
Build sequence with timestamps. Returns None if timestamps are invalid.
scripts/training/train_timestamps.py:467
↓ 1 callersFunction_classify_caption_casing
Classify the casing of a single caption. Args: text: Caption text to classify Returns: Casing type: 'upper', 'lower', o
scripts/data/filtering/data_tagger.py:478
↓ 1 callersFunction_compute_edit_distance
Compute edit distance between texts with various fallback strategies. Args: manual_text: Original manual text machine_text:
scripts/data/filtering/data_tagger.py:345
↓ 1 callersFunction_determine_final_casing
Determine final casing type based on counts with adjustment rules. Args: casing_counts: Dictionary of casing type counts Return
scripts/data/filtering/data_tagger.py:503
↓ 1 callersFunction_download
(url: str, root: str)
demo/convert_openai_to_hf.py:147
↓ 1 callersFunction_download_model
Download a model from a URL and cache it locally. Parameters ---------- url : str URL to download the model from model_n
olmoasr/__init__.py:44
↓ 1 callersFunction_filter_machine_captions
Filter machine captions to remove multi-line captions except for the last one. Args: content: Parsed WebVTT content start_in
scripts/data/filtering/data_tagger.py:235
↓ 1 callersFunction_get_cache_dir
Get the cache directory for storing downloaded models.
olmoasr/__init__.py:33
↓ 1 callersMethod_get_custom_long_form_item
Get custom dataset item for long-form transcription. Loads and preprocesses audio from custom dataset formats for long-form evaluatio
scripts/eval/eval.py:1411
↓ 1 callersMethod_get_custom_short_form_item
Get custom dataset item for short-form transcription. Handles dataset-specific loading and preprocessing for non-HuggingFace datasets
scripts/eval/eval.py:1301
↓ 1 callersFunction_get_generation_config
Loads the appropriate generation config from HF repo
demo/convert_openai_to_hf.py:65
↓ 1 callersMethod_get_hf_long_form_item
Get HuggingFace dataset item for long-form transcription. Processes long-form audio from HuggingFace datasets without padding or mel-
scripts/eval/eval.py:1375
↓ 1 callersMethod_get_hf_short_form_item
Get HuggingFace dataset item for short-form transcription. Processes audio and text from HuggingFace dataset format, handling dataset
scripts/eval/eval.py:1265
↓ 1 callersMethod_get_long_form_item
Get item for long-form transcription. Retrieves and preprocesses audio for variable-length transcription tasks. Does not apply paddin
scripts/eval/eval.py:1354
↓ 1 callersMethod_get_model_info
Extract model type and size from checkpoint path. Analyzes checkpoint file path to automatically determine model type (whisper varian
scripts/eval/eval.py:1595
↓ 1 callersMethod_get_short_form_item
Get item for short-form transcription. Retrieves and preprocesses audio for fixed-length transcription tasks. Handles both HuggingFac
scripts/eval/eval.py:1244
↓ 1 callersFunction_get_start_index_for_machine_content
Determine the starting index for machine content processing. Args: content: Parsed WebVTT content Returns: Starting ind
scripts/data/filtering/data_tagger.py:215
↓ 1 callersFunction_has_repeated_content
Check if current text contains repeated content from history. Args: current_text: Current caption text text_history: List of
scripts/data/filtering/data_tagger.py:613
↓ 1 callersMethod_init_custom_dataset
Initialize custom datasets.
scripts/eval/eval.py:1163
↓ 1 callersMethod_init_hf_dataset
Initialize HuggingFace datasets.
scripts/eval/eval.py:1098
↓ 1 callersMethod_load_and_preprocess_audio
Load and preprocess audio file for language identification. Args: audio_file: Path to the audio file (.npy format)
scripts/data/filtering/tag_audio_lang.py:109
↓ 1 callersFunction_prepare_content_dict
Prepare content dictionary for processing. Args: line: Input line from JSONL file segment_level: Whether processing at segme
scripts/data/filtering/data_tagger.py:815
↓ 1 callersMethod_process_empty_transcript
Process empty transcript case and return appropriate tokens.
scripts/training/train_fsdp_timestamps.py:374
↓ 1 callersMethod_process_empty_transcript
Process empty transcript case and return appropriate tokens.
scripts/training/train_timestamps.py:345
↓ 1 callersFunction_process_line_with_filters
Process a single line through the filtering pipeline. Args: line: Data line to process config: Configuration dictionary with
scripts/data/filtering/process_tagged_data.py:478
↓ 1 callersMethod_process_non_empty_transcript
Process non-empty transcript and return tokens, timestamp_mode, and updated norm_end.
scripts/training/train_fsdp_timestamps.py:423
↓ 1 callersMethod_process_non_empty_transcript
Process non-empty transcript and return tokens, timestamp_mode, and updated norm_end.
scripts/training/train_timestamps.py:394
↓ 1 callersFunction_read_reqs
(relpath)
setup.py:9
↓ 1 callersFunction_save_processed_lines
Save processed lines to a compressed JSONL file. Args: output_lines: List of processed data lines original_path: Original fi
scripts/data/filtering/process_tagged_data.py:539
↓ 1 callersFunction_save_processing_results
Save processing results to files. Args: output_file: Path to output file stats_file: Path to statistics file output_
scripts/data/filtering/data_tagger.py:847
↓ 1 callersFunction_update_casing_stats
Update casing statistics. Args: casing: Final casing determination content_length: Length of content stats: Statisti
scripts/data/filtering/data_tagger.py:531
↓ 1 callersFunction_update_edit_distance_stats
Update edit distance statistics. Args: edit_distance: Calculated edit distance stats: Statistics dictionary to update
scripts/data/filtering/data_tagger.py:376
↓ 1 callersMethod_validate_sequences
Validate sequence lengths and token indices, print warnings if issues found.
scripts/training/train_fsdp_timestamps.py:537
↓ 1 callersMethod_validate_sequences
Validate sequence lengths and token indices, print warnings if issues found.
scripts/training/train_timestamps.py:508
↓ 1 callersFunctionaggregate_video_languages
Aggregate language predictions by video ID using majority voting. Args: predicted_languages: List of (video_id, language_id) predict
scripts/data/filtering/tag_audio_lang.py:233
↓ 1 callersFunctionapply_boolean_filter
Apply boolean filtering logic. Args: tag_value: The boolean value to test reference_value: The expected boolean value R
scripts/data/filtering/process_tagged_data.py:223
↓ 1 callersFunctionapply_categorical_filter
Apply categorical filtering logic. Args: tag_value: The categorical value to test reference_value: Single value or list of v
scripts/data/filtering/process_tagged_data.py:237
next →1–100 of 377, ranked by callers