Audio generation

From Kevin-Liu-01/Claude-of-Tanks · View interactive version

Audio generation is an AI agent skill from the GitHub repository Kevin-Liu-01/Claude-of-Tanks. Generate, select, master and wire the game's ElevenLabs sound effects and multilingual crew radio lines; repair bad takes from the cache; never synthesize or stand in for a sound.

How to use this skill

Skill file

Audio-generation procedure

Purpose

<!-- agent-docs:fill:purpose -->

Take an owner's sound or voice request from a prompt to a shipped, wired and

verified asset without depending on chat memory: what to write, how many takes

to buy, how they are chosen, and how the engine plays them. This is a

repository instruction page reached through the root agent index, not an

installed plugin and not a grant to spend credits or deploy beyond the request.

Read order

<!-- agent-docs:fill:model -->

Read the handbook (pipeline, files, commands, costs, recipes), the

prompt cookbook for the kind of sound you are making, and

quality for scoring and failure modes. Read

CODE0 for the engine (mix, buses, crew radio

scheduling) and the audio skill before touching

src/audio/.

Execution

<!-- agent-docs:fill:tasks -->

  1. Pin down the moment: what the player does or hears, solo and in a network

battle, and which existing event or state carries it. A sound with no moment

is not shipped.

  1. Check what exists first: the catalog, the manifests, unused shipped assets

and the crew script. Rebuilding or re-scoring cached takes is free;

generation is not.

  1. Write the prompt from the cookbook template of its kind: one event, the

perspective and material, the exclusions, "Seamless loop" or "One-shot",

under 450 characters, no bright words. For a crew line, write all 38

languages in the procedure register with the same number of takes, a role, a

delivery and a context.

  1. Estimate the credits (--dry), cap the run (--budget), then generate.

Read the key from ELEVENLABS_API_KEY_FILE; never print or commit it.

  1. Build with a report. Read the ranking, measure the shipped variants, and

look at a contact sheet. If a defect class gets through, add a scoring rule

and rebuild from the cache rather than pinning by hand.

  1. Wire it: the play site, a cue override if needed, the preload set of its

moment, and for a crew line its VOICE_LINES entry and its moment in

voiceTriggers.selftest.mjs. Never chain a substitute

(if (!play(a)) play(b)).

  1. Verify: typecheck, soundAssets, audioEngine, voiceTriggers and

crewRadio selftests, and the affected tests. Run browser probes under the

GPU capture lock when the mix changed.

  1. Document the round in docs/AUDIO.md (what changed, credits), commit the

catalog or script, state manifests, generated manifests and files together,

and publish or deploy only as requested.

Patterns and stop conditions

<!-- agent-docs:fill:patterns -->

Generate 2–3× the variants you ship (6–8 for anything with a transient). Fix a

defect class in the scorer and rebuild everything it affects. Rebuild only the

ids or lines you changed. Stop and ask before a run that would spend more than

the owner has allowed, before replacing a sound the owner approved by ear, or

when a prompt fails twice with the same defect: change the prompt or the

approach, do not buy more takes of it.

Gotchas

<!-- agent-docs:fill:gotchas -->

An "occasional" wrong sound is usually one bad variant (two variants that never

repeat alternate). Sequenced prompts ("a pop, then a motor") can come back

split by silence. eleven_v4 doubles one- and two-word calls; trimming at

pauses fixes it, more attempts do not. Homophones and digits in transcripts are

not failures. The pool's debug log does not record which variant played. A

cue still decoding is silent by design, so pin what a moment needs instead of

covering it. The radio character is live DSP, so voices are mastered dry.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.