audiocraft-audio-generation

Generates music and sound effects from text descriptions using MusicGen, AudioGen, and EnCodec.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-skills --skill audiocraft-audio-generation-clay-hhk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/Clay-HHK/claude-skills/tree/main/audiocraft
Command: npx skills add https://github.com/Clay-HHK/claude-skills --skill audiocraft-audio-generation-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Creating original music 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 prompts using Meta's AudioCraft models. ## Core Features & Use Cases - Text-to-Music with MusicGen: Generate music from text descriptions, with support for melody conditioning, stereo output, and style transfer via MusicGen-Style. - Text-to-Sound with AudioGen: Create sound effects and environmental audio from natural language descriptions. - Audio Compression with EnCodec: Encode and decode audio with a high-fidelity neural codec, including streaming and bandwidth control. - Use Case: A game developer needs background music and ambient sound effects for a prototype. They generate a 30-second orchestral track with MusicGen and batch-produce footsteps, door creaks, and explosion sounds with AudioGen, saving everything as WAV files. ## Quick Start Use the audiocraft skill to generate a 15-second upbeat electronic music track from a text description 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 as a WAV file with torchaudio at 32kHz.

What is the difference between MusicGen and AudioGen?▼

MusicGen generates music from text descriptions and supports melody conditioning and stereo output at 32kHz. AudioGen generates sound effects and environmental audio 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. Use guidance_scale instead of cfg_coef and max_new_tokens instead of duration, roughly 50 tokens per second of audio.

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 MusicGen output silent or poor quality?▼

Check the output tensor amplitude and normalize if too quiet. For better quality, use a larger model, increase cfg_coef for stronger text adherence, lower the temperature, and write specific prompts describing genre, instruments, and tempo.

When should I use alternatives to AudioCraft?▼

Consider Stable Audio for longer commercial music generation, Bark for text-to-speech with music and sound effects, or Riffusion for spectrogram-based music generation. AudioCraft targets research-oriented music and sound generation up to about 30 seconds.