Datasets:

Tasks:
Other
Modalities:
Audio
Languages:
English
ArXiv:
License:
LibriBrain / README.md
oiwi's picture
Update README.md
f32b013 verified
metadata
language:
  - en
license: cc-by-nc-4.0
task_categories:
  - other

LibriBrain (Sherlock Holmes 1–7)

Paper | Code

This repository contains the LibriBrain data organised by book: MEG recordings (.h5), event annotations (.tsv), and the audiobook stimulus audio (.wav).

LibriBrain was first open-sourced as part of the 2025 PNPL Competition.

In addition, LibriBrain is used as a fine-tuning dataset in the paper "MEG-XL: Data-Efficient Brain-to-Text via Long-Context Pre-Training" to evaluate word decoding from brain data.

Sample Usage

The easiest way to get started with the dataset is using the pnpl Python library. There, the following two datasets are available:

LibriBrainSpeech

This wraps the LibriBrain dataset for use in speech detection problems.

from pnpl.datasets import LibriBrainSpeech

speech_example_data = LibriBrainSpeech(
    data_path="./data/",
    partition="train"
)

sample_data, label = speech_example_data[0]

# Print out some basic info about the sample
print("Sample data shape:", sample_data.shape)
print("Label shape:", label.shape)

LibriBrainPhoneme

This wraps the LibriBrain dataset for use in phoneme classification problems.

from pnpl.datasets import LibriBrainPhoneme

phoneme_example_data = LibriBrainPhoneme(
    data_path="./data/",
    partition="train"
)
sample_data, label = phoneme_example_data[0]

# Print out some basic info about the sample
print("Sample data shape:", sample_data.shape)
print("Label shape:", label.shape)

Repository structure

Data are organised into seven top-level directories:

  • Sherlock1/
  • Sherlock2/
  • Sherlock7/

Each Sherlock{i} directory contains:

  • Sherlock{i}/derivatives/serialised/*.h5 — serialised MEG recordings used for the 2025 PNPL competition
  • Sherlock{i}/derivatives/events/*.tsv — competition annotations
  • Sherlock{i}/stimuli/audio/*.wav — stimulus audio
  • Sherlock{i}/sub-0/ses-1/meg/*.fif — raw MEG recordings
  • Sherlock{i}/sub-0/ses-1/meg/*.tsv — BIDS events files (recommended going forward)

Shared metadata

The repository also includes a top-level metadata/ directory containing information shared across all Sherlock{i} datasets:

  • metadata/channels.tsv — BIDS-style channels table (name, type, units, filter settings, sampling frequency, and status) used consistently across datasets.
  • metadata/sensor_xyz.json — sensor position array of shape (n_channels, 3) giving XYZ coordinates for each channel. Please refer to the raw FIF (*_meg.fif) for coordinate frame and transforms. Provided as a lightweight convenience for visualisation / sanity checks.
  • metadata/neo/ct_sparse.fif and metadata/neo/sss_cal.dat — site-specific MaxFilter/SSS calibration files for the NEO scanner. These are required if you want to run Signal Space Separation / Maxwell filtering (e.g. via mne.preprocessing.maxwell_filter) on the raw FIF files. If you are using the preprocessed data that we provide (e.g. serialised .h5 files), then you can ignore these.

Stimulus audio (LibriVox)

The spoken-audio stimuli are derived from LibriVox public-domain recordings of the first seven Sherlock Holmes books (recording versions linked below). The stimuli are provided in this repository as WAV files converted from the LibriVox downloads.

LibriVox source URLs (recording versions)

  1. https://librivox.org/a-study-in-scarlet-version-6-by-sir-arthur-conan-doyle/
  2. https://librivox.org/the-sign-of-the-four-version-3-by-sir-arthur-conan-doyle/
  3. https://librivox.org/the-adventures-of-sherlock-holmes-version-4-by-sir-arthur-conan-doyle/
  4. https://librivox.org/the-memoirs-of-sherlock-holmes-by-sir-arthur-conan-doyle-2/
  5. https://librivox.org/the-hound-of-the-baskervilles-version-4-by-sir-arthur-conan-doyle/
  6. https://librivox.org/the-return-of-sherlock-holmes-by-sir-arthur-conan-doyle-2/
  7. https://librivox.org/the-valley-of-fear-version-3-by-sir-arthur-conan-doyle/

Audio format

The WAV files in this repository are:

  • WAV (PCM), mono (1 channel), 22,050 Hz, 16-bit signed integer PCM

Example conversion command (SoX):

sox "INPUT_FROM_LIBRIVOX.mp3" -c 1 -r 22050 -b 16 "OUTPUT.wav"

Citation

If you use this dataset, please cite the LibriBrain paper:

@article{ozdogan2025libribrain,
  author    = {Özdogan, Miran and Landau, Gilad and Elvers, Gereon and Jayalath, Dulhan and Somaiya, Pratik and Mantegna, Francesco and Woolrich, Mark and Parker Jones, Oiwi},
  title     = {{LibriBrain}: Over 50 Hours of Within-Subject {MEG} to Improve Speech Decoding Methods at Scale},
  year      = {2025},
  journal   = {NeurIPS, Datasets \& Benchmarks Track},
  url       = {https://arxiv.org/abs/2506.02098},
}