audiocraft-audio-generation

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

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill audiocraft-audio-generation-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/loteiron/ZeusAgent/tree/main/optional-skills/creative/audiocraft-audio-generation
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill audiocraft-audio-generation-loteiron

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 composition skills, audio engineering tools, or licensing stock audio. This Skill lets you generate music, sound effects, and compressed audio directly from text descriptions using Meta's AudioCraft models (MusicGen, AudioGen, EnCodec). ## Core Features & Use Cases - Text-to-Music with MusicGen: Generate music from text prompts with control over duration, temperature, and guidance, including melody-conditioned and stereo variants. - Text-to-Sound with AudioGen: Create sound effects and environmental audio such as thunderstorms, traffic, or footsteps from descriptions. - Audio Compression with EnCodec: Encode and decode audio with a neural codec, including streaming and bandwidth-controlled compression. - Use Case: A game developer needs background music and ambient sound effects for a prototype. Use this Skill to batch-generate an orchestral loop, rain ambience, and UI sounds from text prompts, then save them as WAV files. ## Quick Start Use the audiocraft-audio-generation skill to generate a 15-second upbeat electronic music track 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('facebook/musicgen-small'), set generation parameters like duration and temperature, then call model.generate with a list of text descriptions. Save the output tensor with torchaudio.save at 32000 Hz.

What is the difference between MusicGen and AudioGen?▼

MusicGen generates music from text prompts and supports melody conditioning and stereo output, while AudioGen generates sound effects and environmental audio. Both are part of Meta's AudioCraft library and share the same generation API.

Can I use AudioCraft with HuggingFace Transformers?▼

Yes, MusicGen is available in Transformers as MusicgenForConditionalGeneration with AutoProcessor. Note that parameter names differ: use guidance_scale instead of cfg_coef and max_new_tokens instead of duration.

How much GPU memory does MusicGen need?▼

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

Why is my generated audio silent or poor quality?▼

Silent output usually requires normalizing the waveform amplitude. For poor quality, use a larger model, increase cfg_coef for better text adherence, lower the temperature, and write specific prompts describing genre, instruments, and tempo.

What are the limitations of MusicGen generation length?▼

MusicGen typically generates up to 30 seconds of audio per call, output at 32kHz mono unless using a stereo model variant. For longer commercial music, alternatives like Stable Audio are recommended.