--- pretty_name: Bagpiper Pretraining Data Collection language: - en task_categories: - automatic-speech-recognition - text-to-audio tags: - audio - speech - music - sound - multimodal - rich-caption - opus - speech-language-model size_categories: - 100M/shard-NNNNNN.bin Ogg/Opus blobs, concatenated audio//shard-NNNNNN.parquet per-shard index audio//metadata.parquet merged index for the dataset subsets//.txt utterance ids per curation subset subsets/counts.json subset sizes tools/prepare_local.py post-download preparation ``` `prepare_local.py` adds the following on your machine; they are not shipped, because they hold absolute paths: ``` rich_caption//dump/** zstd caption archive (arkive_text) data_jsons//{caption,}.json loader manifests: all rows, and one per subset registry.yaml ESPNET_DATASET_REGISTRY entries ``` Each row of `metadata.parquet` carries the loader columns `utt_id`, `path`, `start_byte_offset`, `file_size_bytes`, `start_time`, `end_time`, plus `doc_id`, `dataset`, `sample_rate`, `channels`, `length`, `format`, `source_sample_rate`, `source_file_size_bytes`, the caption as a plain string in `rich_caption`, and the curation labels `subsets`, `category`, `direction`. Utterances that are time windows over a longer recording share one Opus blob and are distinguished by `start_time` and `end_time`, exactly as in the FLAC source. ## Curation subsets `subsets` is a list, because an utterance can belong to none, one or two of them. Membership comes from the stage-5 curation outputs. An utterance is only ever in the `und` and/or `gen` set of a single modality, so `category` and `direction` are a lossless flattening of the six base subsets. Nine further score-ranked subsets from the SFT selection are included where they exist. | subset | utterances | datasets | |---|---:|---:| | speech_und | 85,023,000 | 15 | | speech_gen | 105,595,360 | 15 | | sound_und | 23,980,555 | 15 | | sound_gen | 24,001,618 | 15 | | music_und | 14,392,994 | 15 | | music_gen | 14,073,000 | 15 | | speech_und_sft | 49,211 | 12 | | speech_gen_sft | 199,847 | 11 | | speech_gen_sft2 | 1,992,076 | 13 | | sound_und_sft | 46,976 | 15 | | sound_gen_sft | 169,467 | 12 | | sound_gen_sft2 | 1,840,892 | 15 | | music_und_sft | 28,941 | 13 | | music_gen_sft | 61,367 | 9 | | music_gen_sft2 | 957,323 | 15 | ## Use ```bash huggingface-cli download --repo-type dataset espnet/Bagpiper_PreTrain_Data_Collection --local-dir ./bagpiper python ./bagpiper/tools/prepare_local.py --root ./bagpiper export ESPNET_DATASET_REGISTRY=./bagpiper/registry.yaml ``` The preparation step is required, and is not optional packaging. The archive stores absolute byte offsets and the loader uses the `path` column verbatim with no root override, so the metadata has to be pointed at wherever the files landed. The same command also builds the zstd caption archive the `arkive_text` reader expects, and writes one manifest per subset. It is idempotent. Reading a clip without ESPnet needs only a seek and a decode: ```python import io, soundfile as sf, pyarrow.parquet as pq # after prepare_local.py, so that `path` points at your copy row = pq.read_table("audio/clotho_test/metadata.parquet").slice(0, 1).to_pylist()[0] with open(row["path"], "rb") as f: f.seek(row["start_byte_offset"]) wav, sr = sf.read(io.BytesIO(f.read(row["file_size_bytes"]))) ``` This needs a libsndfile with Opus support, which means 1.0.29 or newer; 1.2.x reports the stored 16 kHz rate correctly. ## Caveats - Captions are machine generated and were not verified by a human. Rows whose generation hit the length limit are kept and flagged in `caption_finish_reason`. - Caption coverage is not complete for every dataset; the table above gives the per-dataset figure. - Re-encoding from FLAC to Opus is lossy and not reversible. - No blanket license is declared. The underlying corpora carry their own terms and you are responsible for reviewing them. ## Citation ```bibtex @inproceedings{tian2026bagpiper, title = {Bagpiper}, author = {Tian, Jinchuan and others}, booktitle = {COLM}, year = {2026} } ```