audiocraft-audio-generation

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

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

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 melody conditioning, stereo output, and style transfer across model sizes from 300M to 3.3B parameters. - Text-to-Sound with AudioGen: Create sound effects and environmental audio like thunderstorms, traffic, or animal sounds from descriptions. - EnCodec Compression: Encode and decode audio with a high-fidelity neural codec for efficient storage and streaming. - Use Case: A game developer needs background music and ambient sound effects for multiple levels. Use this Skill to batch-generate an orchestral soundtrack, forest ambience, and UI sound effects from text descriptions, then save them 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 MusicGen model with MusicGen.get_pretrained, 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 prompts and supports melody conditioning and stereo output at 32kHz. AudioGen generates sound effects and environmental audio from text at 16kHz. Both are part of Meta's AudioCraft library.

Can I use AudioCraft with HuggingFace Transformers?

Yes, MusicGen is available in HuggingFace Transformers via MusicgenForConditionalGeneration and AutoProcessor. Load facebook/musicgen-small, process text inputs, and call generate with parameters like guidance_scale and max_new_tokens.

How much GPU memory does MusicGen need?

MusicGen-small requires about 4GB VRAM in FP32 or 2GB in FP16, medium needs around 8GB/4GB, and large needs roughly 16GB/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 audio needs normalization or the generation parameters are off. Increase cfg_coef for better text adherence, lower temperature for more focused output, use a larger model, and write specific prompts describing genre, instruments, and mood.

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

Use Stable Audio for longer commercial music generation, and Bark for text-to-speech combined with music or sound effects. AudioCraft is best for controllable text-to-music, melody-conditioned generation, and neural audio compression with EnCodec.