ai-music-generation

Generates music and songs with AudioCraft and HeartMuLa, and analyzes audio via spectrograms.

Updated May 28, 2026
One-click install
npx skills add https://github.com/patty-chow/the-stable --skill ai-music-generation-patty-chow
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-music-generation
Source: https://github.com/patty-chow/the-stable/tree/main/skills/media/ai-music-generation
Command: npx skills add https://github.com/patty-chow/the-stable --skill ai-music-generation-patty-chow

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Creating original music, full songs with lyrics, or analyzing audio content normally requires expensive tools, music theory knowledge, or cloud subscriptions. This Skill provides local text-to-music generation, open-source song synthesis, songwriting prompt craft, and audio visualization in one place. ## Core Features & Use Cases - Text-to-Music with AudioCraft: Generate music, sound effects, and melody-conditioned or style-transferred audio locally using Meta's MusicGen, AudioGen, and EnCodec models. - Full Song Generation with HeartMuLa: Produce complete songs from lyrics and style tags using the open-source Suno alternative, with documented patches for transformers 5.x compatibility. - Songwriting & Suno Prompt Engineering: Apply song structures, rhyme schemes, phonetic spelling tricks, and structural metatags to get better results from any AI music service. - Audio Analysis with songsee: Render spectrograms, mel, chroma, tempogram, and other feature visualizations from audio files for inspection or comparison. - Use Case: Write lyrics and tags for a wedding song, generate it with HeartMuLa on a GPU, then produce a spectrogram with songsee to verify the output quality. ## Quick Start Generate a 10-second upbeat electronic music clip locally using MusicGen with the prompt "happy upbeat electronic dance music with synths" and save it as output.wav.

Frequently Asked Questions about ai-music-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate music from text with MusicGen?▼

Install audiocraft with pip, load a pretrained model like facebook/musicgen-small, set generation params such as duration and top_k, then call model.generate with a descriptive prompt. Save the result with torchaudio.save at 32000 Hz sample rate.

What is the difference between MusicGen and HeartMuLa?▼

MusicGen generates instrumental music from text descriptions and runs locally with models from 300M to 3.3B parameters. HeartMuLa is an open-source Suno alternative that generates full songs with vocals from lyrics and style tags, requiring 16GB or more VRAM.

How much GPU memory does MusicGen need?▼

MusicGen-small needs about 4GB in FP32 or 2GB in FP16, medium needs about 8GB or 4GB, and large needs about 16GB or 8GB. If you hit CUDA out-of-memory errors, switch to a smaller model or reduce the generation duration.

How do I write better prompts for Suno or AI music generators?▼

Use the style field formula: genre plus mood plus era plus instruments plus vocal style plus production plus dynamics. Add structural metatags like [Verse], [Chorus], and [Whispered] in the lyrics field, and use phonetic spellings for words AI singers mispronounce.

Why is my HeartMuLa generation failing after installing?▼

HeartMuLa requires two source patches for transformers 5.x: a Llama3ScaledRoPE cache fix in modeling_heartmula.py and ignore_mismatched_sizes=True in HeartCodec.from_pretrained calls. Also upgrade datasets and transformers after installation to resolve dependency conflicts.

Can I visualize audio features from a generated track?▼

Yes, the songsee CLI generates spectrograms and feature visualizations from audio files. Run songsee track.mp3 with the --viz flag to render spectrogram, mel, chroma, tempogram, mfcc, and other panels, then inspect the output image.