{
  "markdown": "<p align=\"left\" id=\"banner\">\n  <a href=\"https://cto-legends.com\"><img src=\"assets/banner.webp\" alt=\"legends-stable-audio-3 — agentic audio production\" width=\"100%\"></a>\n</p>\n\n# legends-stable-audio-3\n\n[![CI](https://github.com/avalonreset/legends-stable-audio-3/actions/workflows/ci.yml/badge.svg)](https://github.com/avalonreset/legends-stable-audio-3/actions/workflows/ci.yml)\n[![Release](https://img.shields.io/github/v/release/avalonreset/legends-stable-audio-3)](https://github.com/avalonreset/legends-stable-audio-3/releases/latest)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)\n![Python](https://img.shields.io/badge/python-3.10%2B-3776AB)\n![Agents](https://img.shields.io/badge/agents-Codex%20%7C%20Grok%20%7C%20Claude%20%7C%20Gemini-111827)\n[![CTO Legends](https://img.shields.io/badge/CTO-Legends-E10600)](https://cto-legends.com)\n\nGive Codex, Grok, Claude, or Gemini a portable operating brain for Stable Audio\n3—then use the same guarded CLI for local Medium, hosted Large, and long-form\naudio production. No private vault or Obsidian setup is required.\n\nlegends-stable-audio-3 keeps local Medium, hosted Large, the Stable Audio web\nstudio, the DAW plugin, and downstream mixing distinct. Its CLI handles local\nmodel access, setup, prompting, VRAM-aware planning, generation, resumable\nbatches, guarded paid API jobs, and final audio assembly. One supported workflow\ncan fill hours of background music by generating multiple coherent tracks and\ncrossfading them, but the project is not limited to long-form or background\nmusic.\n\nStable Audio 3 Medium is not a Suno-style lyric-to-song system. The local CLI is\nstrongest for instrumental music, music beds, samples, sound effects, adapter\nexperiments, and long-form mixes assembled from fresh segments. The guarded\nhosted Large client adds text-to-audio, audio-to-audio, and inpainting. Medium\ncan sometimes create vocal-like textures, but it does not reliably generate\nintelligible sung lyrics.\n\n## Why use Legends instead of approaching the model cold?\n\nA generic request such as `make a dark cinematic techno track` leaves the agent\nto guess the surface, prompt structure, duration, BPM strategy, sampler settings,\nseed policy, and recovery path. Legends gives the agent a repeatable operating\nmethod:\n\n1. Route the request to local Medium, hosted Large, the web studio, the plugin,\n   or downstream mixing without silently substituting one for another.\n2. Turn the creative brief into concrete musical metadata plus concise prose.\n3. Use short prompt-family and seed tournaments before committing GPU time or\n   paid credits.\n4. Choose duration, BPM, steps, CFG, and VRAM-aware segment sizes deliberately.\n5. Preserve source audio, generation IDs, hashes, and resumable public-safe\n   receipts.\n6. Analyze active cues and assemble long masters without dead-air crossfades or\n   one enormous FFmpeg graph.\n\nThat operating intelligence ships inside the skill. It is the product—not a\nlink back to a private development vault.\n\n## Choose your surface\n\n| Goal | Legends route |\n|---|---|\n| Give an agent the full Stable Audio 3 operating method | Install or open the canonical skill |\n| Run Stable Audio 3 Medium locally | Local CLI, official runtime, gated model bundle, and a hardware-appropriate PyTorch install |\n| Use Stable Audio 3 Large through the API | Guarded `large plan/generate/result` workflow with explicit paid confirmation and recovery |\n| Work in Stable Audio's web studio or DAW plugin | Bundled routing and production guidance; no false claim of end-to-end browser automation |\n| Analyze or assemble existing tracks | Active-cue analysis and streaming crossfade mixer |\n\n## Install the agent skill\n\n### Source checkout\n\nClone the repository and open that directory in Codex, Grok, Claude Code, or\nGemini CLI. The repository includes `AGENTS.md`, `GROK.md`, `CLAUDE.md`,\n`GEMINI.md`, and one synchronized canonical skill:\n\n```bash\ngit clone https://github.com/avalonreset/legends-stable-audio-3.git\ncd legends-stable-audio-3\n```\n\nTo install the packaged skill into a configured directory-based Agent Skills\ntarget, install the release wheel and choose the target explicitly:\n\n```bash\npython -m pip install \"https://github.com/avalonreset/legends-stable-audio-3/releases/download/v0.4.1/legends_stable_audio_3-0.4.1-py3-none-any.whl\"\nlegends-sa3 skill validate\nlegends-sa3 skill install --target <skills-directory>\n```\n\nThe installer creates `<skills-directory>/legends-stable-audio-3` and refuses\nto replace an existing copy. Client discovery locations vary, so it never\nguesses or edits global agent configuration.\n\n## What it does\n\n- Helps users install the Stable Audio 3 runtime.\n- Helps users download model files after they accept Stability AI's gated terms.\n- Helps agents shape prompts, recipes, negative prompts, and repeatable settings.\n- Detects or accepts VRAM limits and recommends practical segment lengths.\n- Accepts free-form style prompts directly, with optional recipes for repeatable\n  scaffolding.\n- Previews expanded Stable Audio prompts before a long run.\n- Generates one-off instrumental tracks or batches in Stable Audio 3-supported\n  music styles.\n- Manages an optional Underfit-powered LoRA Studio workflow for training custom\n  Stable Audio 3 adapters.\n- Runs local Medium prompt-to-audio batches and guarded hosted Large\n  text-to-audio, audio-to-audio, and inpainting jobs.\n- Gives agents explicit web-studio, DAW-plugin, prompting, benchmarking, and\n  receipt guidance without pretending those are local CLI features.\n- Analyzes generated source tracks for quiet heads/tails before mixing.\n- Optionally renders a long continuous MP3 by streaming crossfades between tracks.\n- Analyzes track heads, tails, and active cue points before long MP3 assembly.\n- Keeps source tracks and manifests so interrupted runs can resume.\n\n## What it does not do\n\n- It does not package, mirror, or redistribute Stable Audio model weights.\n- It does not bypass Hugging Face gated model approval.\n- It does not promise that a user's generated output is commercially safe.\n  Users must read and comply with the model license and their local laws.\n- It does not turn typed lyrics into clean sung songs. Stable Audio 3's official\n  docs say the models do not output intelligible vocals and are not designed for\n  speech or voice generation.\n- `--allow-vocals` does not enable lyric singing. It only removes this wrapper's\n  default instrumental bias so users can experiment with vocal-like textures.\n- Its Apache-2.0 source license does not cover model weights, adapters, datasets,\n  hosted services, third-party software, or generated media.\n\n## Local Medium quick start\n\nFrom the source checkout on Windows PowerShell:\n\n```powershell\npython -m venv .venv\n.\\.venv\\Scripts\\python.exe -m pip install -e \".[download]\"\n.\\.venv\\Scripts\\legends-sa3.exe doctor\n.\\.venv\\Scripts\\legends-sa3.exe skill validate\n.\\.venv\\Scripts\\legends-sa3.exe download-model --model medium --output .\\models\\stable-audio-3-medium\n.\\.venv\\Scripts\\legends-sa3.exe plan --minutes 4 --vram-gb 24 --crossfade 12\n```\n\nOn Linux or macOS:\n\n```bash\npython3 -m venv .venv\n./.venv/bin/python -m pip install -e '.[download]'\n./.venv/bin/legends-sa3 doctor\n./.venv/bin/legends-sa3 skill validate\n./.venv/bin/legends-sa3 download-model --model medium --output ./models/stable-audio-3-medium\n./.venv/bin/legends-sa3 plan --minutes 4 --vram-gb 24 --crossfade 12\n```\n\nBefore `download-model`, accept the Stability AI terms for the gated model and\nthe bundled T5Gemma conditioner, then authenticate with Hugging Face yourself.\nThis project never bundles weights or bypasses approval. Install the separate\n`[generate]` extra only after selecting the hardware-appropriate PyTorch build;\nlocal Medium is a supported CUDA path on Windows/Linux and a CPU fallback on\nmacOS, not a claimed MPS-accelerated workflow.\n\nPreview a hosted Stable Audio 3 Large REST request without spending credits:\n\n```powershell\nlegends-sa3 large plan `\n  --operation text-to-audio `\n  --prompt \"TrackType: Music, VocalType: Instrumental, deep dub techno, 118 BPM\" `\n  --duration 120 --seed 42 --steps 8 --cfg-scale 1 --output-format wav\n```\n\nAfter verifying live Platform pricing and balance, load `STABILITY_API_KEY`\nfrom a secret store and add `--confirmed-live-credits <n> --confirm-paid` to a\n`legends-sa3 large generate` command. It submits the asynchronous job, polls the\nresult endpoint, downloads and hashes the audio, and writes a secret-free JSON\nreceipt. See the bundled `references/large-api.md` for text-to-audio,\naudio-to-audio, and inpaint examples and boundaries.\n\nThe generation ID is preserved in a pending receipt before polling. Resume an\ninterrupted paid job with `legends-sa3 large result --generation-id <id>\n--output <file>` rather than submitting it again. Existing outputs and receipts\nare protected unless `--overwrite` is explicit, uploaded audio is preflighted\nwith `ffprobe`, and downloaded bytes are validated before writing.\n\nPreview the prompts before spending GPU time:\n\n```powershell\nlegends-sa3 prompt `\n  --style \"trance hip hop jazz, smoky saxophone, broken beat drums, 104 BPM\" `\n  --count 3\n```\n\nGenerate a single prompt-guided track:\n\n```powershell\nlegends-sa3 generate `\n  --model-dir .\\models\\stable-audio-3-medium `\n  --stable-audio-repo ..\\stable-audio-3 `\n  --style \"trance hip hop jazz, smoky saxophone, broken beat drums, 104 BPM\" `\n  --minutes 6 `\n  --vram-gb 24 `\n  --output .\\output\\trance-hip-hop-jazz\n```\n\nGenerate a long continuous background mix by sequencing many tracks:\n\n```powershell\nlegends-sa3 generate `\n  --model-dir .\\models\\stable-audio-3-medium `\n  --stable-audio-repo ..\\stable-audio-3 `\n  --style \"lo-fi study hip hop, warm Rhodes, soft boom bap drums, no vocals\" `\n  --hours 10 `\n  --vram-gb 24 `\n  --output .\\output\\lofi-study-10h\n```\n\nGenerate with a native Stable Audio 3 LoRA or DoRA adapter:\n\n```powershell\nlegends-sa3 generate `\n  --model-dir .\\models\\stable-audio-3-medium `\n  --stable-audio-repo ..\\stable-audio-3 `\n  --style \"digital hardcore breakbeat trance, acidic bassline, no vocals, 172 BPM\" `\n  --minutes 6 `\n  --vram-gb 24 `\n  --lora-ckpt-path .\\adapters\\eisbach-medium\\model.safetensors `\n  --lora-strength 1.0 `\n  --output .\\output\\eisbach-breakbeat-test\n```\n\nInstall the optional Underfit LoRA Studio bridge:\n\n```powershell\nlegends-sa3 lora-studio install\nlegends-sa3 lora-studio status\n```\n\nThe bridge fetches only the reviewed Underfit commit\n`8a96800a58c0e8b82327fc04ac31c473ed900b73` and verifies the origin, commit,\nrequired files, and MIT license hash before execution. The default command only\nchecks out code. `--run-underfit-install` executes downloaded third-party shell\ncode that bootstraps/synchronizes Python tooling and can, with `--with-setup`,\nclone runtime code or download large gated model packs. Review it first and\naccept model terms yourself.\n\nAfter training in Underfit, import a checkpoint into the Legends adapter\nregistry:\n\n```powershell\nlegends-sa3 lora-studio import `\n  .\\state\\runs\\my-style\\5000.safetensors `\n  --name my-style `\n  --source-run my-style\n```\n\nMix an existing folder of MP3 tracks:\n\n```powershell\nlegends-sa3 mix `\n  --input-dir .\\output\\lofi-study-10h\\tracks_mp3 `\n  --output .\\output\\lofi-study-10h\\lofi-study-10h-master.mp3 `\n  --crossfade 12 `\n  --mix-policy active-cue\n```\n\nAnalyze generated source tracks before mixing:\n\n```powershell\nlegends-sa3 analyze `\n  --input-dir .\\output\\lofi-study-10h\\tracks_mp3 `\n  --json-output .\\output\\lofi-study-10h\\track-analysis.json\n```\n\n## Practical Defaults\n\nThe defaults are based on the RTX 4090 24 GB test run:\n\n- Model: `stabilityai/stable-audio-3-medium`\n- Practical single-generation length: about `380s` on 24 GB VRAM\n- Crossfade: `12s`\n- Default mix policy: `active-cue`\n- Steps: `8`\n- CFG scale: `1.0`\n- Output: stereo MP3, `44.1 kHz`, `320 kbps`\n\nFor lower VRAM cards, start lower:\n\n- 8 GB: `90s` to `120s`\n- 12 GB: `150s` to `180s`\n- 16 GB: `210s` to `240s`\n- 24 GB class: `360s` to `380s`\n\nRun `legends-sa3 plan --hours 1 --vram-gb 16` to see the exact segment count.\n\n## Prompt-First Workflow\n\nStable Audio 3 responds best to concrete musical language: genre, instruments,\nmood or energy, BPM, and production character. legends-stable-audio-3 therefore\nuses free-form `--style` prompts as the primary workflow.\n\nRecipes are optional scaffolds for repeatable batches. They are not a catalog of\neverything the model can do, and users should not need a preset before asking for\nsomething like \"trance hip hop jazz\" or \"cinematic gospel house with breakbeats.\"\n\nCurrent recipes:\n\n- `lofi-study`\n- `trip-hop-trance`\n\n## Vocal And Lyric Boundary\n\nDo not position Stable Audio 3 Medium as a lyric or clean-vocal generator.\n\nThe model can be prompted with vocal language, but its own prompting guide says it\ndoes not output intelligible vocals. In practice, vocal prompts often produce\nvocal-like pads, chants, vowel textures, or gibberish. That can be useful for\nsound design, but it is not a reliable song-with-lyrics workflow.\n\nFor release examples and user-facing demos, prefer instrumental music, background\nbeds, samples, sound effects, solo instruments, audio-to-audio edits,\ninpainting, continuation, and long MP3 mixes.\n\n## Long-Duration Assembly\n\nStable Audio 3 does not create a ten-hour file in a single generation. This\noperator handles that by planning multiple separate generations, keeping them in\nthe same creative lane, and streaming them into one master with smooth crossfades.\nThat gives users a practical way to create long background beds without looping\nthe same song for hours.\n\n## Crossfade Quality Policy\n\nThe default `active-cue` mix policy runs per-track cue analysis before rendering:\n\n- Trims generated near-silent dead air at source heads and tails.\n- Trims quiet generated tails that would otherwise waste the overlap window.\n- Keeps the first track from getting an artificial fade-up.\n- Starts incoming tracks at a usable active cue so the overlap is not wasted on\n  a long warmup.\n- Leaves the final track without an artificial fade-down.\n- Writes per-track trims and warnings into the MP3 manifest.\n\nUse `--mix-policy strict` when you want exact raw track boundaries with only the\nlinear overlap crossfade. Use `--quality-gate fail` when you want the run to stop\nbefore rendering if any track has cue-analysis warnings.\n\n## Agent support\n\nThe canonical repository source is `skills/legends-stable-audio-3`. The wheel\nships a generated, byte-identical copy so agent installation remains available\nafter `pip install`. Repository mirrors are integration fixtures for source\ncheckouts; they are not separate skill sources and must not drift:\n\nThe installed skill also carries its own `references/` library: prompt and\nduration tournaments, BPM decisions, SFX and spoken-word-bed practice, exact\nLarge REST request/polling flow, paid-action receipts, matched A/B boundaries, long-mix policy, adapter\nescalation, licensing boundaries, and a portable mastery eval. Users do not\nneed this project's private development vault—or Obsidian at all—to receive the\noperating method.\n\n- Codex: `AGENTS.md` plus the `.agents/skills/` mirror.\n- Grok: `GROK.md` plus the portable Agent Skills package when supported by the\n  active client.\n- Claude: `CLAUDE.md` plus the `.claude/skills/` mirror.\n- Gemini: `GEMINI.md` plus `gemini-extension.json`.\n\nThe agent instructions all route users toward the same safe workflow:\ndoctor, model access, prompt planning, generate, optional mix, verify.\n\nValidate all adapters:\n\n```powershell\npython scripts\\sync_skill_adapters.py\n```\n\nSynchronize generated mirrors after editing the canonical source:\n\n```powershell\npython scripts\\sync_skill_adapters.py --sync\n```\n\nAfter a source checkout, install the canonical package into an explicit\ndirectory-based Agent Skills target:\n\n```powershell\npython scripts\\sync_skill_adapters.py --install-target <skills-directory>\n```\n\nAfter installing the Python package, use the shipped bundle without needing a\nrepository checkout:\n\n```powershell\nlegends-sa3 skill validate\nlegends-sa3 skill install --target <skills-directory>\n```\n\nBoth installers require an explicit parent directory and refuse to replace an\nexisting `legends-stable-audio-3` folder. They never guess or modify global\nCodex, Grok, Claude, or Gemini locations.\n\n## Documentation\n\n- [Model access](docs/model-access.md)\n- [Prompting guide](docs/prompting-guide.md)\n- [LoRA adapters](docs/lora-adapters.md)\n- [LoRA Studio with Underfit](docs/lora-studio.md)\n- [VRAM guide](docs/vram-guide.md)\n- [Continuous mix workflow](docs/music-factory.md)\n- [Agent compatibility](docs/agent-compatibility.md)\n- [Windows, Linux, and macOS support](docs/platform-support.md)\n- [Hosted surfaces and receipts](docs/hosted-surfaces-and-receipts.md)\n- [Stable Audio 3 Large REST reference](skills/legends-stable-audio-3/references/large-api.md)\n- [Commercial use and license notes](docs/commercial-use-and-license.md)\n- [Apache-2.0 decision and rights record](docs/source-license-decision.md)\n- [Dependency and reproducibility policy](docs/dependency-policy.md)\n- [Troubleshooting](docs/troubleshooting.md)\n- [Release checklist](docs/release-checklist.md)\n\n## Status\n\nCurrent package version: `v0.4.1`. The project is public and the current release\nis available from [GitHub Releases](https://github.com/avalonreset/legends-stable-audio-3/releases/latest).\n\nProject-owned source, documentation, tests, and the current banner are licensed\nunder [Apache License 2.0](LICENSE). `NOTICE`, `THIRD_PARTY_NOTICES.md`, and\n`assets/PROVENANCE.md` document attribution and scope. Models, weights, hosted\nservices, datasets, adapters, generated media, and third-party components retain\ntheir separate terms.\n\nlegends-stable-audio-3 is an independent compatibility project. It is not\naffiliated with, sponsored by, or endorsed by Stability AI. Stability AI and\nStable Audio names identify compatible services and models; their marks remain\nwith their respective owners.\n\nProject: [cto-legends.com](https://cto-legends.com) · Source:\n[avalonreset/legends-stable-audio-3](https://github.com/avalonreset/legends-stable-audio-3)\n",
  "bytes": 18182,
  "sha": "74e433ee351cc5beaa704d456987de0c95f358a584885967fb91d3f0fc9d2834",
  "repo_slug": "avalonreset/legends-stable-audio-3",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_avalonreset_legends_stable_audio_3_575887a6/readme"
}