--- license: other license_name: mixed-per-source license_link: LICENSE task_categories: - automatic-speech-recognition - audio-classification language: - en - zh tags: - audio - speech - asr - audio-captioning - mel-spectrogram - tfrecord pretty_name: Stage 1A Audio Alignment Smoke Data (AuT 128-mel) size_categories: - 100K Licenses follow the upstream corpora: LibriSpeech CC-BY-4.0; AISHELL-1 Apache-2.0; AudioCaps > CC-BY-NC-4.0 (**non-commercial**); silence is synthetic. Use accordingly. ## TFRecord schema (per `tf.train.Example`) | feature | type | meaning | |---|---|---| | `mel` | bytes | fp16 raw, reshape to `[n_mels, n_frames]` | | `n_mels` | int64 | 128 | | `n_frames` | int64 | mel frames, **multiple of 100** (AuT `n_window*2` chunk requirement) | | `feature_len` | int64 | true valid mel frames (`<= n_frames`; the tail is zero-pad) | | `n_audio_tokens` | int64 | `aut_out_lengths(feature_len)` = number of AUDIO_PAD placeholders after the AuT encoder (each full 100 mel frames → 13 encoder frames) | | `text` | bytes | utf-8 target: transcript / caption / `` | | `task` | bytes | `asr` \| `caption` \| `silence` | | `lang` | bytes | `en` \| `zh` \| `na` | ## Load ```python import tensorflow as tf, numpy as np, glob FEAT = { "mel": tf.io.FixedLenFeature([], tf.string), "n_mels": tf.io.FixedLenFeature([], tf.int64), "n_frames": tf.io.FixedLenFeature([], tf.int64), "feature_len": tf.io.FixedLenFeature([], tf.int64), "n_audio_tokens": tf.io.FixedLenFeature([], tf.int64), "text": tf.io.FixedLenFeature([], tf.string), "task": tf.io.FixedLenFeature([], tf.string), "lang": tf.io.FixedLenFeature([], tf.string), } def parse(raw): e = tf.io.parse_single_example(raw, FEAT) return e files = glob.glob("*.tfrecord.gz") ds = tf.data.TFRecordDataset(files, compression_type="GZIP").map(parse) for e in ds.take(1): nm, nf = int(e["n_mels"]), int(e["n_frames"]) mel = np.frombuffer(e["mel"].numpy(), np.float16).reshape(nm, nf) # [128, n_frames], cast to fp32 for AuT print(mel.shape, e["text"].numpy().decode(), int(e["feature_len"]), int(e["n_audio_tokens"])) ``` At train time: `mel[:, :ceil_to_100(feature_len)]` → cast fp32 → frozen AuT encoder → 2048-d audio_states → trainable 2-layer MLP → scatter into `n_audio_tokens` AUDIO_PAD slots of the frozen LLM. ## Provenance Generated by `stage1a_data_prep.py` + `stage1a_npz_to_tfrecord.py` (LLaVA-OV2-tpu, branch `feat/qwen3-audio-stack`). This is **smoke-scale** for pipeline validation; full-scale Stage 1A uses online mel extraction over the larger recipe (MLS-en, People's Speech, etc.).