NeuralGEN consists of three major modules:
- EMu, a joint neural-music embedding model;
- Mapping-1, a music semantic modeling model
- Mapping-2, mapping joint neural-music tokens and semantic tokens to audio codec.
Rely on functions from lucidrains' implementation of MusicLM and AudioLM
pip install musiclm-pytorch
pip install audiolm-pytorch
- Hubert (w2v-bert): HuBERT Base (~95M params)
Download and put it in
./hubert - Unofficial implementation of Soundstream:
import torch
model = torch.hub.load("kaiidams/soundstream-pytorch", "soundstream_16khz")
- Train Mulan and EMu:
./demo/Train_Mulan_EMu.ipynb - Train semantic modeling:
./demo/Train Mapping.ipynb - Inference:
./demo/NeuralGEN_Inference.ipynb
An awkward output ./output/output.wav. (due to using soundstream pretrained on speech dataset.)