audiocraft-audio-generation

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

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/luckybbjason1/trading --skill audiocraft-audio-generation-luckybbjason1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/luckybbjason1/trading/tree/main/.hermes/skills/mlops/models/audiocraft
Command: npx skills add https://github.com/luckybbjason1/trading --skill audiocraft-audio-generation-luckybbjason1

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Creating original music tracks and sound effects traditionally requires musicians, audio engineers, or expensive stock libraries. This Skill lets you generate music, sound effects, and compressed audio directly from text descriptions using Meta's AudioCraft models. ## 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 animal sounds from natural language descriptions. - EnCodec Audio Compression: Encode and decode audio with a neural codec for high-fidelity compression and token-based processing. - Use Case: A game developer needs background music and ambient sound effects for a new level. They generate a 30-second orchestral track with MusicGen and batch-produce environmental sounds with AudioGen, saving everything 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 output tensor as a WAV file at 32kHz using torchaudio.

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 environmental sounds and sound effects from text at 16kHz. Both are part of Meta's AudioCraft library.

Can I use AudioCraft with HuggingFace Transformers?

Yes, MusicGen is available in Transformers via MusicgenForConditionalGeneration and 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 8GB/4GB, and large needs 16GB/8GB. For limited memory, use the small model, reduce duration, or enable half precision.

Why is my MusicGen output silent or poor quality?

Silent output usually requires normalizing the audio amplitude. Poor quality improves with a larger model, higher cfg_coef for text adherence, lower temperature, and more specific prompts describing genre, instruments, and tempo.

What are the limitations of MusicGen generation?

MusicGen typically generates up to 30 seconds of audio per call and cannot produce vocals or lyrics. For longer commercial music, consider Stable Audio; for speech with music, consider Bark.