AudioCraft
Generative audio and music models from Meta
AudioCraft is an open-source library from Meta for audio generation research, including the MusicGen and AudioGen models. It can be self-hosted to generate music and sound effects from text prompts.
Key features
- Text-to-music generation
- Sound effect synthesis
- Pretrained models included
- Runs offline
Pros & cons
Strengths
- State-of-the-art music generation
- Text-to-audio and music
- Backed by Meta research
Trade-offs
- Hefty GPU requirements
- Research-oriented tooling
- Model weights non-commercial
AudioCraft replaces
Last reviewed Aug 26, 2026 · 836 words
Two facts decide whether AudioCraft belongs on your machine. First, the code is MIT but the pretrained model weights are released under a non-commercial licence, so anything you generate for a product, a client, or a monetised channel is off the table unless you train your own. Second, the interesting model, MusicGen large, is a 3.3 billion parameter transformer that wants roughly 16 GB of GPU memory to run comfortably and produces music in 30-second chunks. If either of those is a dealbreaker, stop here. If neither is, this is still the most capable open text-to-music stack you can run entirely offline.
What is actually in the box
AudioCraft is Meta's research library for generative audio, first released in 2023, and it bundles several models behind one Python API. MusicGen generates music from a text prompt (and optionally a melody reference) in 3 sizes: small at about 300 million parameters, medium at about 1.5 billion, and large at about 3.3 billion, plus a melody-conditioned variant. AudioGen does the same for sound effects: "rain on a tin roof", "a diesel engine idling". EnCodec is the neural audio codec both sit on, and MAGNeT is a newer, faster non-autoregressive generator that trades some quality for speed. The packaging is a pip install audiocraft library and a set of Gradio demo scripts, not a server, which is why the deployment column reads "source" and the difficulty reads Hard.
The hardware line, honestly
The minimum RAM figure of 16 GB is the system memory floor for loading and running the larger models; the GPU is what governs your experience. As rough estimates from my own runs: MusicGen small fits in about 4 GB of VRAM and generates a 30-second clip in well under a minute on a mid-range card; medium wants around 8 GB; large is comfortable at 16 GB in half precision and painful below it. CPU-only inference works for small and is a coffee-break affair for anything bigger. If you have not done this arithmetic before, the VRAM math post walks through the parameter-count-to-memory conversion, and the hardware for self-hosted LLMs guide applies almost unchanged because the models are transformers of similar shape.
Installation is the research-tooling experience
Expect the rough edges the "research-oriented tooling" con warns about. You need Python 3.9 or newer, a PyTorch build matching your CUDA version, ffmpeg on the path, and then the library itself:
python -m venv venv && source venv/bin/activate
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install audiocraft
python -m demos.musicgen_app
The demo script launches a Gradio interface on a local port, downloads the requested model on first use into your Hugging Face cache (several gigabytes for large), and after that runs fully offline. Getting the torch and CUDA versions to agree is the step that eats an evening; pin them and write down what worked. There is no official Docker image and no long-running API service, so if you want to call it from another app you write a small FastAPI wrapper yourself. Inside the ComfyUI ecosystem, community nodes wrap MusicGen, which is the least painful route if you already run ComfyUI for images.
The licence line, spelled out
Code under MIT, weights under CC-BY-NC 4.0. That split means you can build and ship software around AudioCraft freely, but the generated audio from Meta's released checkpoints is for non-commercial use. Background music for a personal video is fine. A jingle for a paying client is not, and neither is a public tool that charges for output. Training your own weights on licensed data is the escape hatch, and the library supports it, but that is a research project with a GPU bill attached rather than a self-hosting task. If commercial output is the requirement, a hosted service like ElevenLabs with clear terms is the honest answer, and the AI category lists other locally runnable audio models with friendlier weights licences.
Development has slowed
The repository still carries 23,584 stars, but at last check most activity since 2024 has been maintenance rather than new models, and Meta's audio research has moved to other codebases. Treat AudioCraft as a stable, finished tool rather than a project that will keep improving under you. That is not a criticism; it means what works today keeps working, and there is no upgrade treadmill.
What I'd do
Run MusicGen medium on a card with 8 GB or more, from a pinned venv, for personal projects and prototyping only. Skip large unless you have 16 GB of VRAM and a specific reason. Keep the licence boundary in mind from the first prompt, and if you ever need to sell what it makes, plan on a hosted service or your own training run rather than hoping nobody asks.
Compare AudioCraft
8 head-to-head comparisons.
Similar self-hosted ai apps
OpenClaw
Self-Hosted AIThe AI that actually does things
Hermes Agent
Self-Hosted AIThe AI agent that grows with you
OpenCode
Self-Hosted AIThe open source AI coding agent
Replaces Claude Code, Cursor
Hugging Face Transformers
Self-Hosted AIState-of-the-art machine learning model library
Replaces OpenAI API
Dify
Self-Hosted AIOpen-source platform for building production LLM apps
Replaces OpenAI Assistants, Vertex AI Agent Builder
Langflow
Self-Hosted AIVisual framework for building AI agents and RAG pipelines
Replaces Vertex AI Agent Builder