MusicGen is an AI music generation tool built by Meta that leverages a single Language Model (LM) to generate high-quality music from text descriptions, melodies, or existing audio clips. It can produce mono or stereo output across a wide range of styles and genres, trained on 20,000 hours of licensed music. The model architecture combines a text encoder, a language model-based decoder, and an audio encoder/decoder, supporting both conditional and unconditional generation modes. Users can guide the output through melody conditioning, text prompts specifying genre and tempo, or audio-based prompts. The tool is accessible via a web demo on Hugging Face, a dedicated WebUI, or can be installed locally with Python and CUDA for offline use. Its open-source release under Meta permits commercial applications, with adjustable parameters like guidance scale and maximum length for customized results.
Key Features
- Text-to-music generation
- Melody conditioning from audio files
- Audio-prompted generation
- Mono and stereo output
- Open-source and free for commercial use
- Local installation support
- Training on a diverse dataset of 20,000 hours