Prhokbvf556/Audio-VAE-Phonk-Dataset
收藏资源简介:
--- task_categories: - audio-classification size_categories: - 100K<n<1M --- # 🚗 Phonk Audio Dataset for Generative ML This dataset contains hundreds of hours of high-quality Phonk music (Drift Phonk, Hard Phonk, etc.), specifically scraped, pre-processed, and formatted for training deep learning audio models. It is perfectly suited for training **Audio VAEs, EnCodec, TiTok, or Audio Diffusion / Transformer Prior models** from scratch. ## 📊 Dataset Specifications The audio data has been heavily pre-processed to maximize training efficiency on TPUs/GPUs: * **Format:** `TFRecord` * **Sample Rate:** `32,000 Hz` (Optimized for generative ML, capturing frequencies up to 16kHz) * **Channels:** `1` (Mono) * **Chunk Size:** `131,072 samples` per chunk (Exactly **~4.09 seconds** of audio) * **Data Type:** Raw Waveform (`float32` arrays) * **Quality Control:** - Strict RMS-based silence removal. - MD5 hashing for chunk deduplication (no overlapping repeated segments). ## 🛠️ Preprocessing Pipeline The dataset was constructed using a high-throughput multi-core pipeline: 1. **Source:** YouTube Phonk/Drift mixes and playlists. 2. **Download & Extraction:** `yt-dlp` (bestaudio) -> `ffmpeg` (conversion to 32kHz, Mono, s16). 3. **Slicing:** Audio is loaded into memory, sliced into exact `2^17` (131,072) sample chunks. 4. **Filtering:** Chunks with RMS energy below 0.01 are discarded. 5. **Serialization:** Saved as `tf.train.Example` directly into `TFRecord` shards. ## 💻 How to use (TensorFlow) Since the data is stored in TFRecords, you can stream it directly into your training loop without downloading the entire dataset, which is ideal for Kaggle/Colab environments. ```python import tensorflow as tf def parse_tfrecord_fn(example): feature_description = { "audio": tf.io.FixedLenFeature([131072], tf.float32), } example = tf.io.parse_single_example(example, feature_description) return example["audio"] # Load dataset (can point directly to HF paths or local /dev/shm) raw_dataset = tf.data.TFRecordDataset([ "data/audio_vae_part_0001.tfrecord", "data/audio_vae_part_0002.tfrecord" ]) parsed_dataset = raw_dataset.map(parse_tfrecord_fn, num_parallel_calls=tf.data.AUTOTUNE) parsed_dataset = parsed_dataset.batch(32).prefetch(tf.data.AUTOTUNE) for audio_batch in parsed_dataset.take(1): print(audio_batch.shape) # Expected output: (32, 131072) ``` ⚠️ Intended Use & Limitations This dataset is designed for research in music generation architectures. Due to the aggressive lossy compression of the source material (YouTube Opus/AAC) and the 32kHz downsampling, it is intended for Lo-Fi / Phonk style generation where extreme high-fidelity high-end frequencies (>16kHz) are not required.
任务类别: - 音频分类 规模类别: - 10万 < 样本量 < 100万 # 🚗 适用于生成式机器学习的放克(Phonk)音频数据集 本数据集包含数百小时高质量的放克(Phonk)音乐(包括漂移放克(Drift Phonk)、硬核放克(Hard Phonk)等),专为训练深度学习音频模型进行爬取、预处理与格式标准化。 其非常适合从零开始训练**音频变分自编码器(Audio VAEs)、EnCodec、TiTok、音频扩散模型/Transformer先验模型**。 ## 📊 数据集规格 为最大化TPU/GPU上的训练效率,音频数据已经过深度预处理: * **格式:** `TFRecord` * **采样率:** `32,000 Hz`(针对生成式机器学习优化,可捕获最高16kHz的频率分量) * **声道数:** `1`(单声道) * **块大小:** 每个块含`131,072`个采样点(对应约**4.09秒**的音频时长) * **数据类型:** 原始波形(`float32`数组) * **质量控制:** - 基于RMS的严格静音去除流程 - 使用MD5哈希进行块去重(无重复重叠片段) ## 🛠️ 预处理流水线 本数据集通过高吞吐量多核流水线构建: 1. **数据源:** YouTube平台上的放克/漂移放克混音作品与播放列表 2. **下载与提取:** 使用`yt-dlp`(获取最佳音频流)→ `ffmpeg`(转换为32kHz单声道s16格式) 3. **切片:** 将音频加载至内存,切割为精确的`2^17`(131,072)个采样点的块 4. **过滤:** 丢弃RMS能量低于0.01的块 5. **序列化:** 直接以`tf.train.Example`格式保存至`TFRecord`分片中 ## 💻 使用方法(TensorFlow) 由于数据以TFRecord格式存储,您可直接将其流式传输至训练循环中,无需下载完整数据集,非常适合Kaggle或Colab环境。 python import tensorflow as tf def parse_tfrecord_fn(example): feature_description = { "audio": tf.io.FixedLenFeature([131072], tf.float32), } example = tf.io.parse_single_example(example, feature_description) return example["audio"] # Load dataset (can point directly to HF paths or local /dev/shm) raw_dataset = tf.data.TFRecordDataset([ "data/audio_vae_part_0001.tfrecord", "data/audio_vae_part_0002.tfrecord" ]) parsed_dataset = raw_dataset.map(parse_tfrecord_fn, num_parallel_calls=tf.data.AUTOTUNE) parsed_dataset = parsed_dataset.batch(32).prefetch(tf.data.AUTOTUNE) for audio_batch in parsed_dataset.take(1): print(audio_batch.shape) # Expected output: (32, 131072) ⚠️ 预期用途与局限性 本数据集专为音乐生成架构的研究而设计。由于源素材(YouTube平台的Opus/AAC格式)经过了重度有损压缩,且经过32kHz下采样处理,因此仅适用于低保真(Lo-Fi)/放克风格的音频生成——此类场景无需极高保真度的高频分量(>16kHz)。



