Download
SPDMX ships on Mozilla Data Collective as two archives (~743 GB each, ~1.5 TB total). You need both for the full corpus. License: CC BY 4.0. MDC requires an account and accepting the dataset terms before download.
Setup
Extract both parts into one directory, then optionally restore mix paths for single-track songs.
-
Download Part 1 and Part 2 from the pills above
(MDC may name files like
spdmx-part-1-of-2-….tar.gz). -
Extract both into the same folder so indexes and all
chunk_N/sit together:mkdir -p SPDMX tar -xzf spdmx-part-1-of-2-*.tar.gz -C SPDMX tar -xzf spdmx-part-2-of-2-*.tar.gz -C SPDMX -
(Recommended) Create
mix.flac → 0.flacsymlinks for single-track songs (~65% of the corpus omitmix.flacto avoid duplicating the stem). Multitrack songs already shipmix.flac.cd SPDMX chmod +x link_single_track_mixes.sh ./link_single_track_mixes.shWithout this step, load
0.flacwhensubset:multitrackis false orn_tracks == 1.
Symlink script
The archive includes link_single_track_mixes.sh. If you need it standalone,
copy this into the unpacked dataset root and run it:
#!/usr/bin/env bash
# Optional: for single-track songs, create mix.flac → 0.flac (release omits the mix).
# Run from the unpacked dataset root (where songs.csv lives):
# ./link_single_track_mixes.sh
set -euo pipefail
ROOT="${1:-.}"
CSV="$ROOT/songs.csv"
if [[ ! -f "$CSV" ]]; then
echo "error: missing $CSV" >&2
exit 1
fi
python3 - "$ROOT" "$CSV" <<'PY'
import csv, os, sys
root, path = sys.argv[1], sys.argv[2]
n = 0
with open(path, newline="", encoding="utf-8") as f:
for row in csv.DictReader(f):
multi = row.get("subset:multitrack", "")
if multi != "":
if multi.strip().lower() in ("true", "1"):
continue
elif int(float(row.get("n_tracks") or 0)) >= 2:
continue
song = os.path.join(root, row["path"].lstrip("./"))
if not os.path.isdir(song):
continue
os.symlink("0.flac", os.path.join(song, "mix.flac"))
n += 1
print(f"linked mix.flac → 0.flac for {n} single-track song(s)")
PY
After download
Filter with songs.csv first (e.g. subset:bdgp,
subset:multitrack), then restrict stems.csv.
Join to PDMX on
song_id. Schema details ship in README.md inside the archive.