Transferable Audio Representations via Procedural Generation (Physics-based AudioMAE)
Project description
TransAudio: Transferable Audio Representations via Procedural Generation
An implementation of the AudioMAE model pre-trained entirely on procedurally generated audio (physics-based synthesis). This library allows you to train powerful audio representations without using any real-world data, achieving strong sim-to-real transfer.
Based on the paper: Transferable Audio Representations via Procedural Generation[cite: 1].
Features
- Physics-based Synthesizer : Generates infinite training data using Additive, FM, and Pulse synthesis with ADSR envelopes and transient bursts[cite: 1].
- AudioMAE : Masked Autoencoder tailored for audio spectrograms.
- Zero-Data Pre-training : Train models without downloading massive datasets like AudioSet.
Installation
pip install transaudio
Usage
1. Training from Scratch
You can start the pre-training loop immediately after installation. The synthesizer runs on-the-fly.
transaudio-train --epochs 100 --batch_size 32
2. Using the Model in Python
import torch
from transaudio import mae_vit_base_patch16, advanced_physics_synth
# 1. Create the model
model = mae_vit_base_patch16(audio_exp=True, img_size=(1024, 128 ))
# 2. Generate a synthetic sample
waveform = advanced_physics_synth(f0_hz=440.0 )
print(f"Generated waveform shape: {waveform.shape}" )
# 3. Forward pass (Simulate input)
# Input expected: [Batch, Channel, Time, Freq]
dummy_input = torch.randn(1, 1, 1024, 128 )
loss, pred, mask = model(dummy_input, mask_ratio=0.75 )
print(f"Loss: {loss.item()}" )
Citation
If you use this code, please cite the original paper:
IEEE/ACM TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. XX, NO. XX, 2026
Transferable Audio Representations via Procedural Generation
Fengrui Liu, Ruiyang Huang, Qijian Zheng, Yuanfang Wang, and Feng Liu
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transaudio-0.1.3.tar.gz.
File metadata
- Download URL: transaudio-0.1.3.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85e47b2cd458115e277c39c5825b85464002c8ba030ba42e916a0eb100fedd84
|
|
| MD5 |
ad7bdebdc8faca4eead2c33fc457c570
|
|
| BLAKE2b-256 |
018562f529fd81d96449b775ca1b5fd32bad3950a6cb1b54b46991f40ce32714
|
File details
Details for the file transaudio-0.1.3-py3-none-any.whl.
File metadata
- Download URL: transaudio-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afcb893dd1069be1317d298d669f52c396576ddd62e0a440030cdf88208edb0c
|
|
| MD5 |
2ab8144b894a31d9c610240b17f26b24
|
|
| BLAKE2b-256 |
9d23bee9508078e3e81de788c2f819a06ceea0a153d13d059d6d376eedadf236
|