Skip to content
threejs-audio-generator logo

Three.js Audio Generator

threejs-audio-generator

Generate, convert, clean, and prepare audio assets for Three.js browser games using ElevenLabs. Use for sound effects, looping ambience, UI sounds, impact/weapon/vehicle audio, creature or boss stingers, announcer/dialogue TTS, scratch-performance voice conversion, voice cleanup/isolation, audio manifests, and game-ready web audio integration.

SKILL.md

Full skill instructions

Three.js Audio Generator

Game-ready audio for Three.js projects: SFX, music, voice work, cleanup, and runtime integration. Provider: ElevenLabs.

Resolve <this-skill-dir> from the actual loaded skill file. Resolve sibling skills beside it first, then use the runner's discovered paths. Do not mix installed versions or assume a particular home directory.

Reference

references/​audio-workflows.md — the audio matrix, prompt patterns, generation, music, and voice strategy, Web Audio manager shape, and runtime failure modes. Read it before planning a game's audio, generating a batch, wiring runtime playback, or converting voices.

When to use

SFX (jumps, hits, weapons, explosions, pickups, collisions, UI clicks) · music (menu and gameplay loops, boss themes, intensity layers, win/​lose stingers) · ambience (wind, rain, city bed, engine hum, room tone, arena beds) · voice (announcer barks, boss lines, tutorial prompts, menu narration) · voice conversion from a scratch performance when timing and acting matter · cleanup and isolation before conversion or final use · Web Audio integration with loading, looping, manifests, volume groups, pause/​resume, and gesture unlock.

Audio is not cosmetic for a premium game. Build an audio matrix from the events the game actually has; do not add dialogue, weapons, music, or ambience layers just to fill categories. Respect explicit silent, procedural-audio, accessibility, and external-service constraints. A narrow sound fix does not need a new soundtrack.

API key

The script reads --api-key or ELEVENLABS_API_KEY. Keys never go in skill files, game code, or reports.

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py probe   # ELEVENLABS_API_KEY=SET|MISSING

Keys defined only in a shell profile can be absent from the process env; threejs-game-director/​scripts/​probe_asset_credentials.sh sources the profile and probes all three providers.

Add --validate to call GET /​user and confirm the key actually works (prints VALID_USER=...) when a key is present but generation fails. A valid key can still be blocked by credit or plan limits, which surface as an HTTP 4xx from a real generation attempt — report that as a plan blocker rather than a missing key.

Commands

Run from the game project directory:

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py sfx \
  --prompt "tight futuristic boost pickup, bright transient, short sparkling tail, arcade racing game" \
  --duration 1.2 --prompt-influence 0.65 --out assets/​audio/​sfx/​boost-pickup.mp3

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py sfx \
  --prompt "seamless cyber resort ambience, distant surf, soft neon transformer hum, gentle crowd bed" \
  --duration 12 --loop --prompt-influence 0.45 --out assets/​audio/​ambience/​cyber-resort-loop.mp3

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py music \
  --prompt "driving synthwave race loop, 128 BPM, punchy analog bass, bright arpeggios, steady energy with no intro or fade-out, designed to loop" \
  --duration 60 --instrumental --out assets/​audio/​music/​race-loop.mp3

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py tts \
  --text "Perfect shot." --voice-id JBFqnCBsd6RMkjVDRZzb --out assets/​audio/​voice/​perfect-shot.mp3

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py isolate \
  --input assets/​audio/​source/​noisy-boss-line.wav --out assets/​audio/​voice/​boss-line-clean.mp3

python3 <this-skill-dir>/​scripts/​threejs_audio_asset.py voice-change \
  --input assets/​audio/​source/​scratch-boss-line.wav --voice-id JBFqnCBsd6RMkjVDRZzb \
  --remove-background-noise --out assets/​audio/​voice/​boss-line-final.mp3

Defaults

  • SFX: mp3_44100_128, 0.5–2.5s, prompt influence 0.55–0.8.
  • UI: 0.15–0.8s, high prompt influence, transients kept clear.
  • Ambience: 8–30s with --loop, prompt influence 0.3–0.55.
  • Music: music --prompt (--duration 3–600s, --instrumental) or --plan FILE with a composition_plan JSON for sectioned tracks (--seed works only with plans). The API has no loop flag; lengths, looping, and layering are in the reference's Music Strategy.
  • Voice: TTS for clean generated lines; voice-change when timing and acting from a scratch performance matter. Isolate noisy speech first.
  • Runtime: generate into the game project and load through Web Audio. Follow the project's asset/​version-control policy; do not commit or publish unless asked. No API keys in browser code.

Recovery and Coordination

For coordinated games use the director's references/​asset-recovery.md. Preserve outputs and the audio trigger mapping before retrying work. Distinguish missing credentials, permissions, exhausted credits, invalid input, and transient service failures. Reconcile an uncertain paid request before resubmitting; these one-shot commands do not implement Tripo task resume. Keep independent gameplay work moving and provide a local/​synthesized fallback with honest limitations when genuinely blocked.

Listen to a representative effect or line before generating a batch. Test it through its real game event, then give the lead paths and local playback findings for one consolidated QA pass.

Report

Generated and processed file paths, the prompts, composition plans, text, source files, voice IDs, durations, loop flags and loop points and formats behind them, the runtime trigger mapping and audio groups, and any remaining gaps or plan limits.

More skills from majidmanzarpour

threejs-game-director logo
majidmanzarpour/threejs-game-skills

threejs-game-director

Primary entrypoint for complete Three.js browser game creation and premium iteration. Use by default for build-a-game, upgrade, polish, premium, AAA, high-fidelity, showcase, from-scratch, endless runner, arcade, action, or release-ready requests. Orchestrates sibling skills for gameplay, AAA graphics, UI, debug/profile, and QA/release, plus 3D/image/audio generators for characters, vehicles, weapons, buildings, props, skies, textures, logos, icons, GUI art, and SFX/voice. Keeps skill-loading, reference, asset-sourcing, and phase ledgers so users never choose skills manually.

2.4K 2.5K
View
threejs-debug-profiler logo
majidmanzarpour/threejs-game-skills

threejs-debug-profiler

Debug and profile Three.js browser games. Combines scene debugging, render/runtime/loading/animation/resize/mobile input fixes, performance profiling, draw calls, triangles, textures, memory, shader/post-processing cost, bundle size, and mobile DPR/input issues.

2.4K 2.5K
View
threejs-qa-release logo
majidmanzarpour/threejs-game-skills

threejs-qa-release

Verify and release Three.js browser games. Combines playtest QA, automated bot playtests, mobile/responsive checks, production builds, preview verification, static-hosting base paths, debug gating, bundle review, screenshots, visual test harness decisions, packaged canvas-pixel inspection with measured metrics, console checks, and release risk reports.

2.4K 2.5K
View
threejs-image-generator logo
majidmanzarpour/threejs-game-skills

threejs-image-generator

Generate and edit 2D image assets for Three.js games using Google's Gemini image API. Use for concept sheets, image-to-3D inputs, texture references, sky/background plates, decals, logos, icons, GUI art, title/menu art, thumbnails, marketing stills, and source images that feed threejs-3d-generator. Also use for direct image editing when the user provides an image path.

2.4K 2.4K
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View