Skip to content

Mustard5/music_generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Music Generation Agent Zero Plugin

Generate music from text prompts using Google Lyria 3 Pro via OpenRouter. Create original compositions with detailed control over genre, instrumentation, mood, tempo, and structure.

Features

  • 🎵 Text-to-Music: Describe any music in natural language and get a WAV/MP3 file
  • 🎻 Multi-Genre: Classical, jazz, electronic, ambient, cinematic, lo-fi, rock, and more
  • ⚙️ Detailed Control: Specify genre, instruments, mood, tempo/BPM, key, structure
  • 🔄 Streaming: Audio streams in real-time via SSE — no waiting for full generation
  • 🔌 OpenRouter Powered: Uses the existing OpenRouter API key — no additional signup needed
  • 🧩 Skill-Integrated: Automatically loaded as a skill when installed

Installation

a0 install music_generation

Or manually clone this repo into /a0/usr/plugins/music_generation/ and enable it in the Plugin Manager.

Usage

Load the skill:

skills_tool action=load skill_name=music-generation

Then generate music via code execution:

export OPENROUTER_API_KEY="$API_KEY_OPENROUTER"
python /a0/usr/plugins/music_generation/skills/music-generation/scripts/lyria-gen.py \
  "Atmospheric ambient drone, slow evolving pads, field recordings, peaceful 60 BPM" \
  --output /a0/usr/workdir/ambient.wav --timeout 300

Requirements

  • An OpenRouter API key (Agent Zero's existing API_KEY_OPENROUTER is used automatically)
  • Python package: requests

Model

  • Default: google/lyria-3-pro-preview
  • Sample rate: 48,000 Hz stereo, 16-bit
  • Output formats: WAV (default) or MP3 (auto-detected)

Prompt Tips

Element Examples
Genre jazz, classical, EDM, lo-fi, ambient, cinematic
Instruments piano, strings, synth, drums, orchestra, cello
Mood melancholic, upbeat, peaceful, dramatic
Structure verse-chorus, adagio, building tension, crescendo
Tempo 70 BPM, slow, 128 BPM, fast
Key D minor, C major, A minor

Files

Path Purpose
plugin.yaml Plugin manifest for Agent Zero
skills/music-generation/SKILL.md Skill instructions loaded into agent context
skills/music-generation/scripts/lyria-gen.py Music generation engine

License

MIT

About

Agent Zero plugin: generate music from text prompts via Google Lyria / OpenRouter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages