audiocraft-audio-generation

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

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill audiocraft-audio-generation-avatar-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/mlops/models/audiocraft
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill audiocraft-audio-generation-avatar-arts

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, licensed libraries, or expensive tools. 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: Produce sound effects like thunderstorms, traffic, or footsteps from natural language descriptions. - Audio Compression with EnCodec: Encode and decode audio into neural codec tokens for compression or downstream generation pipelines. - Use Case: A game developer needs ambient sound effects for multiple scenes. They batch-generate rain, footsteps, and door creaks with AudioGen, then use MusicGen to create a looping background track, all saved as WAV files. ## 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('facebook/musicgen-small'), 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. Choose based on whether you need musical content or sound effects.

Can I use AudioCraft through 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 a smaller model if you hit CUDA out-of-memory errors.

Why is my generated audio silent or poor quality?

Check the output amplitude and normalize if it is too quiet. For better quality, use a larger model, write more specific prompts describing genre, instruments, and tempo, and tune cfg_coef and temperature.

When should I use Stable Audio or Bark instead of AudioCraft?

Use Stable Audio for longer commercial music generation, Bark for text-to-speech combined with music or sound effects, and Riffusion for spectrogram-based generation. AudioCraft fits text-to-music, melody conditioning, and sound effect tasks.