AutoMix is a Streamlit-based application for generating audio transitions(inpainting mask gaps) for the purpose of continuations between musics. The app provides two generation engines you can choose from:
-
AudioLDM Diffusion-based audio model suitable for transitions, inpainting, and text-guided generation.
-
MusicGen (Audiocraft) Transformer-based model that has been modified to support bidirectional generation, allowing the model to consider both left and right context when generating transitions.
AutoMix uses both AudioLDM and Audiocraft, installed separately.
Use this as reference: https://github.com/haoheliu/AudioLDM
conda create -n audioldm python=3.8
conda activate audioldm
pip3 install git+https://github.com/haoheliu/AudioLDM.git
git clone https://github.com/haoheliu/AudioLDM
cd AudioLDM
Use this as reference: https://github.com/facebookresearch/audiocraft
conda create -n audioldm python=3.9
conda activate automix
python -m pip install 'torch==2.1.0'
# You might need the following before trying to install the packages
python -m pip install setuptools wheel
# Install MusicGen / Audiocraft
python -m pip install -U audiocraft # stable release
# Install ffmpeg for audio I/O
conda install "ffmpeg<5" -c conda-forge
The default MusicGen transformer only supports forward generation. To generate transitions that blend both previous and upcoming audio (bidirectional context), AutoMix requires a modified transformer.py download here
Locate Audiocraft instalation path and replace the transformer file, example path:
/home/user/miniconda3/envs/audioldm/lib/python3.9/site-packages/audiocraft/modules/transformer.py
Download the finetuned model weights here
Place them inside checkpoint folder:
checkpoint/
├── audioldm-s-full-V1.ckpt
└── others...
AutoMix expects:
dataset/
│
├── chunks/ # 10-second WAV files, 32 kHz
│
└── music/ # Full-length tracks
pip install streamlit
streamlit run app.py
- AudioLDM — https://github.com/haoheliu/AudioLDM
- MusicGen / Audiocraft — https://github.com/facebookresearch/audiocraft