audiocraft-audio-generation

Generate music and sound effects from text prompts using AudioCraft models.

5|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill audiocraft-audio-generation-medtilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/MedTiLab/Auto-meta-analysis/tree/main/skills/multimodal/audiocraft
Command: npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill audiocraft-audio-generation-medtilab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires audiocraft, torch, transformers, and includes references (resource) components.

What problem does it solve? Creating original music tracks or sound effects normally requires audio production skills and licensed content. This Skill lets you generate music from text descriptions with MusicGen, create sound effects with AudioGen, and compress audio with EnCodec, all through PyTorch-based models. ## Core Features & Use Cases - Text-to-Music Generation: Produce music clips from natural language prompts using MusicGen models ranging from 300M to 3.3B parameters, with stereo and melody-conditioned variants. - Text-to-Sound Effects: Generate environmental sounds and effects with AudioGen for games, videos, or prototypes. - Audio Compression: Encode and decode audio with the EnCodec neural codec for efficient storage or token-based pipelines. - Use Case: A game developer needs background music and ambient sounds for a prototype. They describe each track in text, batch-generate the audio, and save WAV files ready for the engine. ## Quick Start Ask the AI to generate a 15-second upbeat electronic music track from a text description using MusicGen and save it as a WAV file.

Frequently Asked Questions about audiocraft-audio-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate music from text with MusicGen?▼

Load a pretrained model with MusicGen.get_pretrained, set generation parameters like duration and temperature, then call model.generate with a list of text descriptions. Save the returned waveform with torchaudio.save at 32kHz.

What is the difference between MusicGen and AudioGen?▼

MusicGen generates music from text prompts and supports melody conditioning and stereo output at 32kHz. AudioGen generates environmental sounds and sound effects from text at 16kHz. Both are part of the AudioCraft library.

Can I use AudioCraft through HuggingFace Transformers?▼

Yes, MusicGen is available in Transformers as MusicgenForConditionalGeneration with AutoProcessor. You provide text inputs and call model.generate with parameters like guidance_scale and max_new_tokens instead of AudioCraft's native API.

How much GPU memory does MusicGen need?▼

MusicGen-small needs about 4GB VRAM in FP32 or 2GB in FP16, medium needs about 8GB or 4GB, and large needs about 16GB or 8GB. Reduce duration or use the small model if you hit CUDA out-of-memory errors.

Why is my MusicGen output silent or poor quality?▼

Silent output usually means the waveform needs normalization to a target loudness. Poor quality improves with a larger model, higher cfg_coef for stronger text adherence, lower temperature, and more specific prompts describing genre, instruments, and tempo.

What are the limitations of MusicGen generation length?▼

MusicGen typically generates up to 30 seconds per call, with duration set via set_generation_params. For longer pieces, generate segments and concatenate them, or use audio continuation with a prompt audio input.