Datasets:
First version of BLAB
Browse filesFiles changed (2)
- README.md+251
- blab_long_audio.pyAdded+352
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254---
license: cc-by-4.0
mutilinguality:
- monolingual
task_categories:
- audio-text-to-text
size_categories:
- 1K<n<10K
source_datasets:
- original
pretty_name: BLAB (Brutally Long Audio Bench)
tags:
- speech
- audio
- speech-llm
- audio-lm
- long-audio
- spoken-language-understanding
viewer: true
configs:
- config_name: word_localization
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: answer_type
dtype: string
- name: groundtruth
dtype: LargeList
inner_dtype:
- name: word
dtype: string
- name: start
dtype: float32
- name: end
dtype: float32
- config_name: advertisement_localization
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: answer_type
dtype: string
- name: groundtruth
dtype: Struct
fields:
- name: ads_segment
dtype: LargeList
inner_dtype:
- name: text
dtype: string
- name: start
dtype: float32
- name: end
dtype: float32
- name: word_timestamp
dtype: LargeList
inner_dtype:
- name: word
dtype: string
- name: start
dtype: float32
- name: end
dtype: float32
- config_name: named_entity_localization
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: answer_type
dtype: string
- name: groundtruth
dtype: Struct
fields:
- name: entities
dtype: LargeList
inner_dtype:
- name: entity_type
dtype: string
- name: entity
dtype: string
- name: start
dtype: float32
- name: end
dtype: float32
- name: word_timestamp
dtype: LargeList
inner_dtype:
- name: word
dtype: string
- name: start
dtype: float32
- name: end
dtype: float32
- config_name: speaker_number_estimation
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: groundtruth
dtype: Sequence # It's a list, even if it might contain one element
inner_dtype:
dtype: int32 # The type of elements within the list
- config_name: entire_duration
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: groundtruth
dtype: float32
- config_name: event_duration
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: question
dtype: string
- name: answer_type
dtype: string
- name: groundtruth
dtype: float32
- config_name: emotion_ranking
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: type
dtype: string
- name: question
dtype: string
- name: correct_option
dtype: string
- name: option_A
dtype: string
- name: option_B
dtype: string
- name: option_C
dtype: string
- name: option_D
dtype: string
- name: option_E
dtype: string
- name: correct_answer
dtype: string
- config_name: emotion_reasoning
features:
- name: video_url
dtype: string
- name: audio
dtype: string
- name: type
dtype: string
- name: question
dtype: string
- name: correct_option
dtype: string
- name: option_A
dtype: string
- name: option_B
dtype: string
- name: option_C
dtype: string
- name: option_D
dtype: string
- name: correct_answer
dtype: string
---
# BLAB: Brutally Long Audio Bench
## Dataset Summary
Brutally Long Audio Bench (BLAB) is a challenging long-form audio benchmark that evaluates audio LMs on localization, duration estimation, emotion, and counting tasks using audio segments averaging 51 minutes in length. BLAB consists of 833+ hours of diverse, full-length Youtube audio clips, each paired with human-annotated, text-based natural language questions and answers. Our audio data were collected from permissively licensed sources and underwent a human-assisted filtering process to ensure task compliance.
NB: This data should only be used for evaluation purposes and not for model training.
## Tasks Covered in BLAB
### Localization
* **Word Localization:** Locate the exact start and end times of specific words within the audio.
* **Named Entity Localization:** Detect and locate the exact start and end times of named entities (e.g., people, organizations, locations).
* **Advertisement Localization:** Locate and transcribe advertisement segments within a podcast.
### Counting
* **Speaker Number Estimation:** Determine the number of unique speakers present in the full audio segment.
### Duration
* **Event Duration:** Calculate the duration of specific acoustic events (e.g., laughter in a comedy special, question-and-answer segments in a panel session, or a particular speaker’s total speaking time in a meeting) within an audio sample,.
* **Entire Duration:** Estimate the total duration of an audio file, expressed in seconds.
### Emotion
* **Emotion Reasoning:** Reason over emotional expressions conveyed in the audio.
* **Emotion Ranking:** Rank different emotional expressions of speech and non-verbal sound present in the audio.
## Dataset Structure
To load a specific task from BLAB, you'll need to specify its configuration name. Keep in mind that **BLAB provides URLs to the YouTube audio files, not the actual audio files themselves.** You'll need to download the audio from these URLs separately.
```python
from datasets import load_dataset
# Load the Word Localization task
word_localization_data = load_dataset("oreva/blab_long_audio", "word_localization")
# Load the Named Entity Localization task
named_entity_localization_data = load_dataset("oreva/blab_long_audio", "named_entity_localization")
# You can load any other task similarly:
# speaker_number_estimation_data = load_dataset("oreva/blab_long_audio", "speaker_number_estimation")
# entire_duration_data = load_dataset("oreva/blab_long_audio", "entire_duration")
# event_duration_data = load_dataset("oreva/blab_long_audio", "event_duration")
# emotion_reasoning_data = load_dataset("oreva/blab_long_audio", "emotion_reasoning")
# emotion_ranking_data = load_dataset("oreva/blab_long_audio", "emotion_ranking")
```
# Citation
```
@misc{ahia2025blabbrutallylongaudio,
title={BLAB: Brutally Long Audio Bench},
author={Orevaoghene Ahia and Martijn Bartelds and Kabir Ahuja and Hila Gonen and Valentin Hofmann and Siddhant Arora and Shuyue Stella Li and Vishal Puttagunta and Mofetoluwa Adeyemi and Charishma Buchireddy and Ben Walls and Noah Bennett and Shinji Watanabe and Noah A. Smith and Yulia Tsvetkov and Sachin Kumar},
year={2025},
eprint={2505.03054},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2505.03054},
}
```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352import jsonimport osimport datasetsfrom datasets import Features, Value, DatasetInfo, SplitGenerator, BuilderConfig, LargeList, Sequence
TASKS = [ "word_localization", "advertisement_localization", "named_entity_localization", "speaker_number_estimation", "entire_duration", "event_duration", "emotion_ranking", "emotion_reasoning",]
_DOCUMENT_DATASET_VERSION = "1.0.0"
# --- Main Dataset Builder Class ---class BLAB(datasets.GeneratorBasedBuilder): """class BLAB(object): A dataset builder supporting various audio QA tasks, each with its own specific data schema. """ BUILDER_CONFIGS = [ BuilderConfig( name=task, version=datasets.Version(_DOCUMENT_DATASET_VERSION), description=f"BLAB dataset for task: {task}", ) for task in TASKS ]
def _info(self): """Defines the dataset schema (features) based on the selected task configuration.""" # --- Schema Definitions for each individual task ---
if self.config.name == "word_localization": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": LargeList( feature=Features({ "word": Value("string"), "start": Value("float32"), "end": Value("float32"), }) ) }), description="Schema for the Word Localization task: segmenting and labeling words.", license="MIT", )
elif self.config.name == "advertisement_localization": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": Features({ "ads_segment": LargeList( feature=Features({ "text": Value("string"), "start": Value("float32"), "end": Value("float32"), }), ), "word_timestamp": LargeList( feature=Features({ "word": Value("string"), "start": Value("float32"), "end": Value("float32"), }), ), }) }), description="Schema for Advertisement Localization task: identifying ad segments and their transcripts.", # ... (other metadata) )
elif self.config.name == "named_entity_localization": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": Features({ "entities": LargeList( feature=Features({ "entity_type": Value("string"), "entity": Value("string"), "start": Value("float32"), "end": Value("float32"), }), ), "word_timestamp": LargeList( feature=Features({ "word": Value("string"), "start": Value("float32"), "end": Value("float32"), }), ), }) }), description="Schema for Named Entity Localization task: identifying specific entities and their timestamps.", # ... (other metadata) )
elif self.config.name == "speaker_number_estimation": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": Sequence(Value("int32")) }), description="Schema for Speaker Number Estimation task: counting speakers in a segment.", # ... (other metadata) )
elif self.config.name == "entire_duration": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": Value("float32") }), description="Schema for Entire Duration task: determining the total duration of an audio.",
)
elif self.config.name == "event_duration": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "groundtruth": Value("float32"), "answer_type": Value("string"), }), description="Schema for Event Duration task: identifying and timing specific events.", # ... (other metadata) )
elif self.config.name == "emotion_ranking": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "type": Value("string"), "correct_option": Value("string"), "option_A": Value("string"), "option_B": Value("string"), "option_C": Value("string"), "option_D": Value("string"), "option_E": Value("string"), "correct_answer": Value("string"), # Stores the correct_answer string }), description="Schema for Emotion Ranking task: selecting the best emotion option.", # ... (other metadata) )
elif self.config.name == "emotion_reasoning": return DatasetInfo( features=Features({ "video_url": Value("string"), "audio": Value("string"), "question": Value("string"), "type": Value("string"), "correct_option": Value("string"), "option_A": Value("string"), "option_B": Value("string"), "option_C": Value("string"), "option_D": Value("string"), "correct_answer": Value("string"), # Stores the correct_answer string }), description="Schema for Emotion Reasoning task: explaining emotional context.", # ... (other metadata) ) else: raise ValueError(f"Unknown config name: {self.config.name}")
def _split_generators(self, dl_manager): """Returns SplitGenerators based on the selected task configuration.""" data_files = {}
if self.config.name == "word_localization": data_files = {"word_localization": "blab_long_audio/word_localization.json"} elif self.config.name == "advertisement_localization": data_files = {"advertisement_localization": "blab_long_audio/advertisement_localization.json"} elif self.config.name == "named_entity_localization": data_files = {"named_entity_localization": "blab_long_audio/named_entity_localization.json"} elif self.config.name == "speaker_number_estimation": data_files = {"speaker_number_estimation": "blab_long_audio/speaker_number_estimation.json"} elif self.config.name == "entire_duration": data_files = {"entire_duration": "blab_long_audio/entire_duration.json"} elif self.config.name == "event_duration": data_files = {"event_duration": "blab_long_audio/event_duration.json"} elif self.config.name == "emotion_ranking": data_files = {"emotion_ranking": "blab_long_audio/emotion_ranking.json"} elif self.config.name == "emotion_reasoning": data_files = {"emotion_reasoning": "blab_long_audio/emotion_reasoning.json"} else: raise ValueError(f"Unknown config name: {self.config.name}")
resolved_data_files = dl_manager.download_and_extract(data_files)
generators = [] for split_name, filepath in resolved_data_files.items(): generators.append( SplitGenerator( name=split_name, gen_kwargs={"filepath": filepath} ) ) return generators
def _generate_examples(self, filepath): """Yields examples from the dataset files, parsing data based on the active config.""" with open(filepath, 'r', encoding='utf-8') as f: all_data = json.load(f) # For .json files, load the entire array
for id_, data in enumerate(all_data): try: # Common fields for all tasks (handle missing with .get) video_url = data.get("video_url", None) audio = data.get("audio", None) question = data.get("question", None) #answer_type = data.get("answer_type", None)
example = { "video_url": video_url, "audio": audio, "question": question, #"answer_type": answer_type # Include as it's a common field in your schemas }
# --- Task-specific groundtruth and other fields --- if self.config.name == "word_localization": raw_groundtruth = data.get("groundtruth", []) processed_groundtruth = [] for item in raw_groundtruth: if isinstance(item, dict): processed_groundtruth.append({ "word": item.get("word", None), "start": item.get("start", None), "end": item.get("end", None), }) example["groundtruth"] = processed_groundtruth
elif self.config.name == "advertisement_localization": raw_groundtruth = data.get("groundtruth", {}) raw_ads_segments = raw_groundtruth.get("ads_segment", []) processed_ads_segments = [] for ad_item in raw_ads_segments: if isinstance(ad_item, dict): processed_ads_segments.append({ "text": ad_item.get("text", None), "start": ad_item.get("start", None), "end": ad_item.get("end", None), }) raw_word_timestamps = raw_groundtruth.get("word_timestamp", []) processed_word_timestamps = [] for word_item in raw_word_timestamps: if isinstance(word_item, dict): processed_word_timestamps.append({ "word": word_item.get("word", None), "start": word_item.get("start", None), "end": word_item.get("end", None), }) example["groundtruth"] = { "ads_segment": processed_ads_segments, "word_timestamp": processed_word_timestamps, }
elif self.config.name == "named_entity_localization": raw_groundtruth = data.get("groundtruth", {}) raw_entities = raw_groundtruth.get("entities", []) processed_entities = [] for entity_item in raw_entities: if isinstance(entity_item, dict): processed_entities.append({ "entity_type": entity_item.get("entity_type", None), "entity": entity_item.get("entity", None), "start": entity_item.get("start", None), "end": entity_item.get("end", None), }) raw_word_timestamps = raw_groundtruth.get("word_timestamp", []) processed_word_timestamps = [] for word_item in raw_word_timestamps: if isinstance(word_item, dict): processed_word_timestamps.append({ "word": word_item.get("word", None), "start": word_item.get("start", None), "end": word_item.get("end", None), }) example["groundtruth"] = { "entities": processed_entities, "word_timestamp": processed_word_timestamps, }
elif self.config.name == "speaker_number_estimation": raw_groundtruth = data.get("groundtruth", None) processed_groundtruth = [] if raw_groundtruth is not None: if isinstance(raw_groundtruth, list): processed_groundtruth = [int(x) for x in raw_groundtruth if isinstance(x, (int, float))] elif isinstance(raw_groundtruth, (int, float)): processed_groundtruth = [int(raw_groundtruth)]
example["groundtruth"] = processed_groundtruth
elif self.config.name == "entire_duration": example["groundtruth"] = data.get("groundtruth", None) # Assuming float
elif self.config.name == "event_duration": example["groundtruth"] = data.get("groundtruth", None) example["answer_type"] = data.get("answer_type", None)
elif self.config.name == "emotion_ranking": example["type"] = data.get("type", None) example["correct_option"] = data.get("correct_option", None) example["option_A"] = data.get("option_A", None) example["option_B"] = data.get("option_B", None) example["option_C"] = data.get("option_C", None) example["option_D"] = data.get("option_D", None) example["option_E"] = data.get("option_E", None) example["correct_answer"] = data.get("correct_answer", None)
elif self.config.name == "emotion_reasoning": example["type"] = data.get("type", None) example["correct_option"] = data.get("correct_option", None) example["option_A"] = data.get("option_A", None) example["option_B"] = data.get("option_B", None) example["option_C"] = data.get("option_C", None) example["option_D"] = data.get("option_D", None) example["correct_answer"] = data.get("correct_answer", None)
else: raise ValueError(f"Unknown config name: {self.config.name}. This should not happen if BUILDER_CONFIGS and _info are consistent.")
yield id_, example
except Exception as e: print(f"Error processing example {id_} in {filepath} for config {self.config.name}: {e}")README.md+251
blab_long_audio.pyAdded+352