audiocraft-audio-generation

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

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill audiocraft-audio-generation-mlt-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audiocraft-audio-generation
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/skills/mlops/models/audiocraft
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill audiocraft-audio-generation-mlt-oss

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 traditionally requires audio production skills and expensive tools. This Skill lets you generate music from text descriptions, produce sound effects, and perform melody-conditioned generation using Meta's AudioCraft library. ## Core Features & Use Cases - Text-to-Music with MusicGen: Generate music from text prompts with control over duration, temperature, and guidance, using models from 300M to 3.3B parameters. - Text-to-Sound with AudioGen: Create sound effects and environmental audio such as thunderstorms, traffic, or footsteps. - Melody and Style Conditioning: Guide generation with reference melodies (musicgen-melody) or style excerpts (musicgen-style), plus stereo output and EnCodec audio compression. - Use Case: A game developer needs background music and ambient sound effects. Describe each track in text, batch-generate them with AudioGen and MusicGen, and save the WAV files directly into the project. ## 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 with torchaudio.save at 32000 Hz.

What is the difference between MusicGen and AudioGen?

MusicGen generates music from text descriptions and supports melody conditioning, while AudioGen generates sound effects and environmental audio. MusicGen outputs at 32kHz and AudioGen at 16kHz.

How much GPU memory does MusicGen need?

MusicGen-small needs about 2GB VRAM in FP16, medium needs about 4GB, and large needs about 8GB. If you hit CUDA out-of-memory errors, use a smaller model, reduce duration, or clear the CUDA cache between generations.

Can I condition music generation on an existing melody?

Yes, use the facebook/musicgen-melody model and call generate_with_chroma with your text descriptions, a melody waveform, and its sample rate. The melody should be mono and resampled to 32kHz.

Why is my generated audio silent or distorted?

Silent output usually means the audio needs normalization to a target loudness. Distortion or clipping can be fixed by scaling amplitudes below 1.0, applying soft clipping, or lowering the generation temperature for more controlled output.

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 conditioning, and sound effect generation.